Now, create UI for this demo, Open Main.storyboard file & make design as per given below screen:

As per above screen, clearly shows that Top Bar is made with UIView & other part cover with UICollectionView.

Step – 3: UICollectionView Delegate & DataSource link

Now, Click on UICollectionView component on Main.storyboard (or left sidebar click Collection View) and make Right Click on it & give link to the View Controller as per display in below screenshot:

Here, Right click give you two option 1st datasource & 2nd delegate. Make connection with View Controller. This is very important thing to display data in UICollectionView.

Step – 4: UICollectionViewCell Identifier set

Now, click on Collection View Cell (left sidebar) or direct click on UICollectionViewCell, which you put on UICollectionView. Now, Right sidebar have some option where 2nd option is Identifier. Set it with any value. This looks like:

Here, we set identifier “cell”. We use this identifier in further process for displaying data in UICollectionViewCell.

Step – 5: UICollectionView Code

Now, we implement code for UICollectionView display data in list format. For that in project navigation sidebar (left side) you have two file ViewController.h & ViewController.m file.

Here, identifier “cell” is used with dequeueReusableCellWithReuseIdentifier for create new item & re used it when it disappear form screen. And we create UILabel programmatically & set some of it’s property. We set text is Cell : (row number) format.

About The Author

I am iOS Application Developer & I personally believed that When a programming language is created that allows programmers to program in simple English, it will be discovered that programmers cannot speak English.

Related Blog

With each new version comes new challenges for the developers. With the iPhone came iOS version, this system is operated on various iOS devices and it keeps on updating every year. At the same time, it brings a number of challenges for the developers around the ...

Push notification is a technique used to flash up any message on the screen of mobile users. App owner can broadcast the message to its app users, at any point of time. It's not mandatory for the app should be in the execution form, in order to get the message ...