Posts

Showing posts from January, 2014

Code for CollectionView

interface file - ( void )viewDidLoad {     [ super viewDidLoad ];          [ super viewDidLoad ];     self . collectionView = _collectionView ;     self . collectionView . dataSource = self ;     self . collectionView . delegate = self ;          self . collectionView . backgroundColor = [ UIColor clearColor ];          UICollectionViewFlowLayout *flowLayout = [[ UICollectionViewFlowLayout alloc ] init ];     [flowLayout setScrollDirection : UICollectionViewScrollDirectionVertical ];          flowLayout. minimumInteritemSpacing = 10 ;     flowLayout. minimumLineSpacing = 10 ;          flowLayout. sectionInset = UIEdgeInsetsMake ( 10 , 10 , 10 , 10 );          [ self . collectionView setCollectionViewLayout :flowLayout]; ...

Code for DateFormatter

  NSDateFormatter *dateFormatter=[[ NSDateFormatter alloc ] init ];         NSString *currentDateString = @"2014-01-08T21:21:22.737+05:30" ;         [dateFormatter setDateFormat : @"yyyy-MM-dd'T'HH:mm:ss.SSSZ" ];         NSDate *currentDate = [dateFormatter dateFromString :currentDateString];                   NSLog ( @"CurrentDate:%@" , currentDate);