ios6
NSGenericException’, reason: ‘Unable to install constraint on view
You need to install the constraint on the “higher” of the two views. A good, general way to do this is like this: NSLayoutConstraint* constraint = …; NSView* firstView = constraint.firstItem; NSView* secondView = constraint.secondItem; [[firstView ancestorSharedWithView: secondView] addConstraint: constraint]; Just a word of caution: It’s good to remember here that constraint attributes are evaluated … Read more
UIPageViewController: get the currentPage
It looks like you should be able to get the current index with: ContentViewController *viewController = [self.pageViewController.viewControllers lastObject]; currentIndex = [modelArray indexOfObject:[viewController page]];
change the height of a UICollectionReuseableView (collection section header) dynamically
Your delegate should implement the following function, assuming you’re using a flow layout: – (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section; You can return a different size for each header. In horizontally scrolling collection views, only the width is used. In vertically scrolling ones, only the height is used. The unused value is ignored — your view will … Read more
Dynamic UIView height with auto layout in iOS 6
You are setting the height contraint of your webView as 266. That’s why the height of the web view is still fixed. You can create this height constraint as an IBOutlet, for example: @property (weak, nonatomic) IBOutlet NSLayoutConstraint *webViewHeightConstraint; And then you can modify the constant of the height constraint when the web view has … Read more
Status bar appear over my view’s bounds in iOS 7 [duplicate]
iOS 7 apparently supports the Status Bar being hidden for some views but not others. To hide it for all views, do the following: Make sure Hide during application launch is still checked, to support previous OS versions. In your Info.plist file, add View controller-based status bar appearance and set it to NO. You may … Read more