Posts

Showing posts from April, 2018

Collection View AutoLayout Final

Image
AutoLayout : for "CollectionView" only – "Hight" & "Right" to add new constrain in below to size -------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------- // //   ViewController.swift //   collectioncart view // //   Created by sital mandal on 4/18/18. //   Copyright © 2018 sital mandal. All rights reserved. // import UIKit class ViewController: UIViewController , UICollectionViewDelegateFlowLayout , UICollectionViewDataSource {              var collectionView: UICollectionView ?     var screenSize: CGRect !     var screenWidth: CGFloat !     var screenHeight: CGFloat !        //   var myImage = UIImage(named: "1")          var imageArr : NSArray !...

How to create UICollectionView with Custom Cell using Swift in iOS

Image
https://ktrkathir.wordpress.com/2015/07/31/how-to-create-uicollectionview-with-custom-cell-using-swift-in-ios/ CollectionView using Custom Cell Screenshot 1 CollectionView using Custom Cell Screenshot 2 Set Delegate for UICollectionViewDelegate,UICollectionViewDataSource, UICollectionViewDelegateFlowLayout and Init the NSArray Value import UIKit class ViewController: UIViewController, UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout { var imageArr : NSArray! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. //set image name in this array imageArr = ["1","2","3","4","5","6","7","1","2","3","4","5","6","7","1","2","3","4","5"...