Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9173023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:29:31+00:00 2026-06-17T16:29:31+00:00

Here is the code of the collection view: – (void)viewDidLoad { [super viewDidLoad]; …

  • 0

Here is the code of the collection view:

- (void)viewDidLoad
{
    [super viewDidLoad];
    ...
    [_teamsCollection registerClass:[MWTeamCollectionCell class] forCellWithReuseIdentifier:@"Cell"];

}
#pragma mark data source and delegate methods of collection view
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
    return 1;
}

-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    return 10;
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *CellIdentifier = @"Cell";
    MWTeamCollectionCell *cell = [_teamsCollection dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];
    if (cell == nil) {
        cell = (MWTeamCollectionCell*)[[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }
    cell.teamName.text = @"team name";
    return cell;
}

When I debug the line return cell;, I get proper log, but I do not see the cells.

(gdb) po cell
<MWTeamCollectionCell: 0x72aff80; baseClass = UICollectionViewCell; frame = (0 0; 50 50); layer = <CALayer: 0x72b0090>>
(gdb) po cell
<MWTeamCollectionCell: 0x72b08e0; baseClass = UICollectionViewCell; frame = (67.5 0; 50 50); layer = <CALayer: 0x72b0970>>
(gdb) po cell
<MWTeamCollectionCell: 0x8aad380; baseClass = UICollectionViewCell; frame = (135 0; 50 50); layer = <CALayer: 0x8a72d20>>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:29:33+00:00Added an answer on June 17, 2026 at 4:29 pm

    Don’t need to register class like UITabeView, try this:

    [yourCollection registerClass:[MWTeamCollectionCell class] forCellWithReuseIdentifier:@"CellName"];
    

    And then

    - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath
    {
        MWTeamCollectionCell *cell = [yourCollection dequeueReusableCellWithReuseIdentifier:@"CellName" forIndexPath:indexPath];
        //Setting some thing here
    
        return cell;
    
    }
    

    That’s enough, remember MWTeamCollectionCell:UICollectionViewCell and customize in (id)init in MWTeamCollectionCell.m(init your teamName label)

    And UICollectionView work only with iOS6, if you try iOS5,nothing display

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my code: {{#collection contentBinding=someArray}} {{#view valueBinding=view.content}} <a>{{view.value}}</a> {{/view}} {{/collection}} I want to add
Here's some basic code to create a ListViewGroup, add it to the Groups collection
Here a code to demonstrate an annoying problem: class A { public: A(): m_b(1),
here my code- <asp:BoundField DataField=DayOfTheWeek HeaderText=Day ItemStyle-CssClass=Itemstyle/> from my collection entity I am getting
Here is code in form.html.erb for partial view. Local var :sid was defined as
here is a code : using System; using Nemerle.Collections; using Nemerle.Text; //using Nemerle.Utility; using
Here's some code: OdbcConnection connection = new OdbcConnection(@DRIVER={MySQL ODBC 5.1 Driver};SERVER= + ip +
here is my db connection code and query code: // Connecting, selecting database $link
The script is on jsfiddle here : CODE What it does at the moment
Ok the error is showing up somewhere in this here code if($error==false) { $query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.