Expand and collapse the cells from the selected Section in UICollectionViewControllerHow do I fetch recent created photos in cell?How to show images from API in CollectionViewiAd UICollectionView on every 5 cellIssues with casting celltypes to dequeueAdding a custom UIViewcontroller to subview programmatically but getting an error message “Cannot convert value of type…”Swift CollectionViewCells IssueHow can I programmatically make a UICollectionView fill a UITableViewCell?Swift Error - Use of undeclared type 'cell' - Collection ViewSwift vertical UICollectionView inside UITableViewMultiple UICollection View on single UIView Scrolling is not working while cell data loading from API
Are paving bricks differently sized for sand bedding vs mortar bedding?
What does routing an IP address mean?
What is this called? Old film camera viewer?
How should I respond when I lied about my education and the company finds out through background check?
How can Trident be so inexpensive? Will it orbit Triton or just do a (slow) flyby?
Can I sign legal documents with a smiley face?
Are the IPv6 address space and IPv4 address space completely disjoint?
Fear of getting stuck on one programming language / technology that is not used in my country
Where does the bonus feat in the cleric starting package come from?
Is there a working SACD iso player for Ubuntu?
why `nmap 192.168.1.97` returns less services than `nmap 127.0.0.1`?
Pre-mixing cryogenic fuels and using only one fuel tank
Aragorn's "guise" in the Orthanc Stone
How do I color the graph in datavisualization?
Creepy dinosaur pc game identification
How do you make your own symbol when Detexify fails?
Why electric field inside a cavity of a non-conducting sphere not zero?
Is it improper etiquette to ask your opponent what his/her rating is before the game?
What should you do if you miss a job interview (deliberately)?
Is there a name for this algorithm to calculate the concentration of a mixture of two solutions containing the same solute?
Did arcade monitors have same pixel aspect ratio as TV sets?
Why Shazam when there is already Superman?
Problem with TransformedDistribution
Did Swami Prabhupada reject Advaita?
Expand and collapse the cells from the selected Section in UICollectionViewController
How do I fetch recent created photos in cell?How to show images from API in CollectionViewiAd UICollectionView on every 5 cellIssues with casting celltypes to dequeueAdding a custom UIViewcontroller to subview programmatically but getting an error message “Cannot convert value of type…”Swift CollectionViewCells IssueHow can I programmatically make a UICollectionView fill a UITableViewCell?Swift Error - Use of undeclared type 'cell' - Collection ViewSwift vertical UICollectionView inside UITableViewMultiple UICollection View on single UIView Scrolling is not working while cell data loading from API
I have been trying to collapse and expand the cells in collectionView when the section header is clicked but all the headers were expanding rather then the selected header.
This is my code
class ExampleHomeController: UICollectionViewController, UICollectionViewDelegateFlowLayout
var expandedRow: Bool = false
var section: Int!
let postCellId = "postCellId"
let headerCellId = "headerCellId"
override func viewDidLoad()
super.viewDidLoad()
collectionView.delegate = self
collectionView.dataSource = self
collectionView.backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
collectionView.register(PostCell.self, forCellWithReuseIdentifier: postCellId)
collectionView.register(HeaderCell.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: headerCellId)
override func numberOfSections(in collectionView: UICollectionView) -> Int
return 4
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
return 3
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: postCellId, for: indexPath)
return cell
override func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView
let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: headerCellId, for: indexPath) as! HeaderCell
header.downArrowBtn.addTarget(self, action: #selector(showCells), for: .touchUpInside)
return header
@objc func showCells()
if expandedRow == false
expandedRow = true
else
expandedRow = false
collectionView.reloadData()
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
if expandedRow == true
return CGSize(width: view.frame.width - 24, height: 280)
else
return CGSize(width: view.frame.width - 24, height: 0)
And this is my Post Cell
class PostCell: UICollectionViewCell
override init(frame: CGRect)
super.init(frame: frame)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let postImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "one")
return view
()
func setupViews()
backgroundColor = .white
addSubview(postImage)
postImage.anchor(top: contentView.topAnchor, leading: nil, bottom: contentView.bottomAnchor, trailing: nil, padding: .init(top: 20, left: 0, bottom: 0, right: 0), size: .init(width: 70, height: 0))
postImage.centerXAnchor.constraint(equalTo: contentView.centerXAnchor).isActive = true
And this is my HeaderCell
class HeaderCell: UICollectionViewCell
var expandedRow: Bool!
override init(frame: CGRect)
super.init(frame: frame)
backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let headerImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "facebook")
return view
()
let headerLabel: UILabel =
let label = UILabel()
label.text = "Posts By Network"
return label
()
let downArrowBtn: UIButton =
let button = UIButton()
button.setImage(#imageLiteral(resourceName: "downarrow"), for: .normal)
button.imageView?.contentMode = .scaleAspectFit
return button
()
func setupViews()
addSubview(headerImage)
addSubview(headerLabel)
addSubview(downArrowBtn)
headerImage.anchor(top: contentView.topAnchor, leading: contentView.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 8, left: 12, bottom: 0, right: 0), size: .init(width: 30, height: 30))
headerLabel.anchor(top: headerImage.topAnchor, leading: headerImage.trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 2, left: 20, bottom: 0, right: 0))
headerLabel.centerYAnchor.constraint(equalTo: headerImage.centerYAnchor).isActive = true
downArrowBtn.anchor(top: headerLabel.topAnchor, leading: headerLabel.trailingAnchor, bottom: nil, trailing: contentView.trailingAnchor, padding: .init(top: 0, left: 0, bottom: 0, right: 12), size: .init(width: 20, height: 20))
All the cells were expanding when header is clicked, but I want to expand and collapse only the selected section, How can I do this. I am new to swift and have been trying this for past few weeks.
Thank you
swift uicollectionview expand expandable
add a comment |
I have been trying to collapse and expand the cells in collectionView when the section header is clicked but all the headers were expanding rather then the selected header.
This is my code
class ExampleHomeController: UICollectionViewController, UICollectionViewDelegateFlowLayout
var expandedRow: Bool = false
var section: Int!
let postCellId = "postCellId"
let headerCellId = "headerCellId"
override func viewDidLoad()
super.viewDidLoad()
collectionView.delegate = self
collectionView.dataSource = self
collectionView.backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
collectionView.register(PostCell.self, forCellWithReuseIdentifier: postCellId)
collectionView.register(HeaderCell.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: headerCellId)
override func numberOfSections(in collectionView: UICollectionView) -> Int
return 4
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
return 3
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: postCellId, for: indexPath)
return cell
override func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView
let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: headerCellId, for: indexPath) as! HeaderCell
header.downArrowBtn.addTarget(self, action: #selector(showCells), for: .touchUpInside)
return header
@objc func showCells()
if expandedRow == false
expandedRow = true
else
expandedRow = false
collectionView.reloadData()
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
if expandedRow == true
return CGSize(width: view.frame.width - 24, height: 280)
else
return CGSize(width: view.frame.width - 24, height: 0)
And this is my Post Cell
class PostCell: UICollectionViewCell
override init(frame: CGRect)
super.init(frame: frame)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let postImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "one")
return view
()
func setupViews()
backgroundColor = .white
addSubview(postImage)
postImage.anchor(top: contentView.topAnchor, leading: nil, bottom: contentView.bottomAnchor, trailing: nil, padding: .init(top: 20, left: 0, bottom: 0, right: 0), size: .init(width: 70, height: 0))
postImage.centerXAnchor.constraint(equalTo: contentView.centerXAnchor).isActive = true
And this is my HeaderCell
class HeaderCell: UICollectionViewCell
var expandedRow: Bool!
override init(frame: CGRect)
super.init(frame: frame)
backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let headerImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "facebook")
return view
()
let headerLabel: UILabel =
let label = UILabel()
label.text = "Posts By Network"
return label
()
let downArrowBtn: UIButton =
let button = UIButton()
button.setImage(#imageLiteral(resourceName: "downarrow"), for: .normal)
button.imageView?.contentMode = .scaleAspectFit
return button
()
func setupViews()
addSubview(headerImage)
addSubview(headerLabel)
addSubview(downArrowBtn)
headerImage.anchor(top: contentView.topAnchor, leading: contentView.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 8, left: 12, bottom: 0, right: 0), size: .init(width: 30, height: 30))
headerLabel.anchor(top: headerImage.topAnchor, leading: headerImage.trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 2, left: 20, bottom: 0, right: 0))
headerLabel.centerYAnchor.constraint(equalTo: headerImage.centerYAnchor).isActive = true
downArrowBtn.anchor(top: headerLabel.topAnchor, leading: headerLabel.trailingAnchor, bottom: nil, trailing: contentView.trailingAnchor, padding: .init(top: 0, left: 0, bottom: 0, right: 12), size: .init(width: 20, height: 20))
All the cells were expanding when header is clicked, but I want to expand and collapse only the selected section, How can I do this. I am new to swift and have been trying this for past few weeks.
Thank you
swift uicollectionview expand expandable
You should look at this video: youtu.be/ClrSpJ3txAs
– Arthur Guiot
Mar 8 at 6:22
That is for expanding UITableView. But I want it for UICollectionView
– user 10424120
Mar 8 at 9:09
add a comment |
I have been trying to collapse and expand the cells in collectionView when the section header is clicked but all the headers were expanding rather then the selected header.
This is my code
class ExampleHomeController: UICollectionViewController, UICollectionViewDelegateFlowLayout
var expandedRow: Bool = false
var section: Int!
let postCellId = "postCellId"
let headerCellId = "headerCellId"
override func viewDidLoad()
super.viewDidLoad()
collectionView.delegate = self
collectionView.dataSource = self
collectionView.backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
collectionView.register(PostCell.self, forCellWithReuseIdentifier: postCellId)
collectionView.register(HeaderCell.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: headerCellId)
override func numberOfSections(in collectionView: UICollectionView) -> Int
return 4
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
return 3
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: postCellId, for: indexPath)
return cell
override func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView
let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: headerCellId, for: indexPath) as! HeaderCell
header.downArrowBtn.addTarget(self, action: #selector(showCells), for: .touchUpInside)
return header
@objc func showCells()
if expandedRow == false
expandedRow = true
else
expandedRow = false
collectionView.reloadData()
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
if expandedRow == true
return CGSize(width: view.frame.width - 24, height: 280)
else
return CGSize(width: view.frame.width - 24, height: 0)
And this is my Post Cell
class PostCell: UICollectionViewCell
override init(frame: CGRect)
super.init(frame: frame)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let postImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "one")
return view
()
func setupViews()
backgroundColor = .white
addSubview(postImage)
postImage.anchor(top: contentView.topAnchor, leading: nil, bottom: contentView.bottomAnchor, trailing: nil, padding: .init(top: 20, left: 0, bottom: 0, right: 0), size: .init(width: 70, height: 0))
postImage.centerXAnchor.constraint(equalTo: contentView.centerXAnchor).isActive = true
And this is my HeaderCell
class HeaderCell: UICollectionViewCell
var expandedRow: Bool!
override init(frame: CGRect)
super.init(frame: frame)
backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let headerImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "facebook")
return view
()
let headerLabel: UILabel =
let label = UILabel()
label.text = "Posts By Network"
return label
()
let downArrowBtn: UIButton =
let button = UIButton()
button.setImage(#imageLiteral(resourceName: "downarrow"), for: .normal)
button.imageView?.contentMode = .scaleAspectFit
return button
()
func setupViews()
addSubview(headerImage)
addSubview(headerLabel)
addSubview(downArrowBtn)
headerImage.anchor(top: contentView.topAnchor, leading: contentView.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 8, left: 12, bottom: 0, right: 0), size: .init(width: 30, height: 30))
headerLabel.anchor(top: headerImage.topAnchor, leading: headerImage.trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 2, left: 20, bottom: 0, right: 0))
headerLabel.centerYAnchor.constraint(equalTo: headerImage.centerYAnchor).isActive = true
downArrowBtn.anchor(top: headerLabel.topAnchor, leading: headerLabel.trailingAnchor, bottom: nil, trailing: contentView.trailingAnchor, padding: .init(top: 0, left: 0, bottom: 0, right: 12), size: .init(width: 20, height: 20))
All the cells were expanding when header is clicked, but I want to expand and collapse only the selected section, How can I do this. I am new to swift and have been trying this for past few weeks.
Thank you
swift uicollectionview expand expandable
I have been trying to collapse and expand the cells in collectionView when the section header is clicked but all the headers were expanding rather then the selected header.
This is my code
class ExampleHomeController: UICollectionViewController, UICollectionViewDelegateFlowLayout
var expandedRow: Bool = false
var section: Int!
let postCellId = "postCellId"
let headerCellId = "headerCellId"
override func viewDidLoad()
super.viewDidLoad()
collectionView.delegate = self
collectionView.dataSource = self
collectionView.backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
collectionView.register(PostCell.self, forCellWithReuseIdentifier: postCellId)
collectionView.register(HeaderCell.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: headerCellId)
override func numberOfSections(in collectionView: UICollectionView) -> Int
return 4
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
return 3
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: postCellId, for: indexPath)
return cell
override func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView
let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: headerCellId, for: indexPath) as! HeaderCell
header.downArrowBtn.addTarget(self, action: #selector(showCells), for: .touchUpInside)
return header
@objc func showCells()
if expandedRow == false
expandedRow = true
else
expandedRow = false
collectionView.reloadData()
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
if expandedRow == true
return CGSize(width: view.frame.width - 24, height: 280)
else
return CGSize(width: view.frame.width - 24, height: 0)
And this is my Post Cell
class PostCell: UICollectionViewCell
override init(frame: CGRect)
super.init(frame: frame)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let postImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "one")
return view
()
func setupViews()
backgroundColor = .white
addSubview(postImage)
postImage.anchor(top: contentView.topAnchor, leading: nil, bottom: contentView.bottomAnchor, trailing: nil, padding: .init(top: 20, left: 0, bottom: 0, right: 0), size: .init(width: 70, height: 0))
postImage.centerXAnchor.constraint(equalTo: contentView.centerXAnchor).isActive = true
And this is my HeaderCell
class HeaderCell: UICollectionViewCell
var expandedRow: Bool!
override init(frame: CGRect)
super.init(frame: frame)
backgroundColor = UIColor.init(r: 220, g: 214, b: 214)
setupViews()
required init?(coder aDecoder: NSCoder)
fatalError("init(coder:) has not been implemented")
let headerImage: UIImageView =
let view = UIImageView()
view.image = #imageLiteral(resourceName: "facebook")
return view
()
let headerLabel: UILabel =
let label = UILabel()
label.text = "Posts By Network"
return label
()
let downArrowBtn: UIButton =
let button = UIButton()
button.setImage(#imageLiteral(resourceName: "downarrow"), for: .normal)
button.imageView?.contentMode = .scaleAspectFit
return button
()
func setupViews()
addSubview(headerImage)
addSubview(headerLabel)
addSubview(downArrowBtn)
headerImage.anchor(top: contentView.topAnchor, leading: contentView.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 8, left: 12, bottom: 0, right: 0), size: .init(width: 30, height: 30))
headerLabel.anchor(top: headerImage.topAnchor, leading: headerImage.trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 2, left: 20, bottom: 0, right: 0))
headerLabel.centerYAnchor.constraint(equalTo: headerImage.centerYAnchor).isActive = true
downArrowBtn.anchor(top: headerLabel.topAnchor, leading: headerLabel.trailingAnchor, bottom: nil, trailing: contentView.trailingAnchor, padding: .init(top: 0, left: 0, bottom: 0, right: 12), size: .init(width: 20, height: 20))
All the cells were expanding when header is clicked, but I want to expand and collapse only the selected section, How can I do this. I am new to swift and have been trying this for past few weeks.
Thank you
swift uicollectionview expand expandable
swift uicollectionview expand expandable
edited Mar 11 at 4:59
user 10424120
asked Mar 8 at 4:35
user 10424120user 10424120
31
31
You should look at this video: youtu.be/ClrSpJ3txAs
– Arthur Guiot
Mar 8 at 6:22
That is for expanding UITableView. But I want it for UICollectionView
– user 10424120
Mar 8 at 9:09
add a comment |
You should look at this video: youtu.be/ClrSpJ3txAs
– Arthur Guiot
Mar 8 at 6:22
That is for expanding UITableView. But I want it for UICollectionView
– user 10424120
Mar 8 at 9:09
You should look at this video: youtu.be/ClrSpJ3txAs
– Arthur Guiot
Mar 8 at 6:22
You should look at this video: youtu.be/ClrSpJ3txAs
– Arthur Guiot
Mar 8 at 6:22
That is for expanding UITableView. But I want it for UICollectionView
– user 10424120
Mar 8 at 9:09
That is for expanding UITableView. But I want it for UICollectionView
– user 10424120
Mar 8 at 9:09
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55056793%2fexpand-and-collapse-the-cells-from-the-selected-section-in-uicollectionviewcontr%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55056793%2fexpand-and-collapse-the-cells-from-the-selected-section-in-uicollectionviewcontr%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You should look at this video: youtu.be/ClrSpJ3txAs
– Arthur Guiot
Mar 8 at 6:22
That is for expanding UITableView. But I want it for UICollectionView
– user 10424120
Mar 8 at 9:09