Ios Unwind Segue Not Working Fix

2014-08-11 00:00:00 +0000

iOS unwind segue not working fix

REMARK

  • IBAction func unwindToHome(segue :UIStoryboardSegue) this function is added to the Destination view controller
  • if Destination is UINavigationController rootViewController then add this function to to the UINavigationController instead of the rootViewController
  • button is link the the exit icon of the parent view controller with unwindToHome

Ios Uirefreshcontrol Add Margin Fix

2014-08-07 00:00:00 +0000

iOS UIRefreshControl add margin fix

why

if set UIRefreshControl attributedTitle before refresh the control there will be a top margin

fix

method 1

assign refreshControl after set attributedTitle

var refreshControl = UIRefreshControl()
refreshControl.attributedTitle = NSAttributedString(string: "Last:", attributes: [NSForegroundColorAttributeName: UIColor.whiteColor()])
self.refreshControl = refreshControl

method 2

set attributedTitle in refresh callback

Uicollectionview Cellforitematindexpath Not Called Fix

2014-08-07 00:00:00 +0000

UICollectionView cellForItemAtIndexPath not called fix,UICollectionView margin fix

cellForItemAtIndexPath not called for many reasons

for my problem: cell is not in the visible area of UICollectionView, because the Adjust scroll view insets option of parent view controller is on by default, this cause automatic add margin to the UICollectionView

fix

toggle off Adjust Scroll View Insets option in parent view controller attribute inspector or add this code to parent view controller viewDidLoad method:

self.automaticallyAdjustsScrollViewInsets = NO;
« Prev 1 2 3 4 5 6 Next »