I have taken UICollectionView
in storyboard. I have set datasource
and delegate
also.
below method is called
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return 4;
}
But - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
is not called.
Attaching screenshot of properties of UICollectionView
. Any idea about this problem?
Now collectionView is visible if I hide the navigationBar. In have set top constraint Myheader Collection View.top = Top Layout Guide.bottom + 64
thought it is at top of controller. and I am receiving follwing warning after completion of method -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
.
Warning: nable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<_UILayoutSupportConstraint:0x7fda80dcff20 V:[_UILayoutGuide:0x7fda830006f0(0)]>", "<_UILayoutSupportConstraint:0x7fda80daca10 V:|-(0)-[_UILayoutGuide:0x7fda830006f0] (Names: '|':UIView:0x7fda80efb580 )>", "", "" )
Will attempt to recover by breaking constraint
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.