ios - ios7 UILabel in UICollectionViewCell does not show -
7.0 target deployment, running on iOS7.1, Xcode 5
I have a UIImageView " ComicImage ". And UILabel "comicTitle" UICollectionViewCell set using IB to
comicTitle uses these settings:
IBOutlet is tilted up properly. The visual cell is properly registered for the collection. I produce
- (UICollectionViewCell *) collectionView: (UICollectionView *) collectionView cellForItemAtIndexPath: (NSIndexPath *) indexPath code> pre> text on the console and title Submitted to the comic title P>
When I run the app, a comic image shows, but the comic tilt is not visible. I have ensured that the comic title is set to alpha 1.0. P>
This same piece of code used to work in the last app with the deployment target deployed on IOS6. P>
I do not know what can happen to anyone else what is wrong. P>
Thanks in advance p>
Edit:?! P>
- (void) viewDidLoad {UINib * comicStripCellNib = [UINib nibWithNibName: @ "Comicstrivivsel" Bundles: NI]; [_comicStripCollectionView registerNib: comicStripCellNib forCellWithReuseIdentifier: @ "comicStripCell"]; } - See the (UICollectionViewCell *) collection: (UICollectionView *) collectionView cellForItemAtIndexPath: (NSIndexPath *) indexpath {comic stripwiew ViewCell * comicStripViewCell = [collectionView dequeueReusableCellWithReuseIdentifier: @ "comicStripCell" forIndexPath: indexPath]; ComicStripViewCell.comicTitle.text = @ "This is a title"; ComicStripViewCell.comicImage.image = [UIImage imageNamed: @ "thisImage.png"]; NSLog (@ "ComicstrivilWaselicTital.text =% @", ComicstrivilVeselicTechnicalText); Return (UICollectionViewCell *) Comic Strevviselcel; } Code> pre> I do not think this is a problem with code. P> div>
some suggestions. P>
- To check if your label is where li>
- Apply background frame, give test and error and see that your label is not wrong. Li>
- If you have used obstacles, make sure you have given specific obstacles right. Li>
-
Check if your comic image does not overlap with your label p> li>
-
You can actually see a preview of your xib xcode in (I.e., after you design your cell, you can confirm how your cell will actually display the screen). See screenshot below p> li> ol>
P> div> html>
Comments
Post a Comment