Dear coders,
I've started working on an iPhone app and i've been struggling with a few things.
The most struggled part is designing the interface.
Now I know there is a GUI designer, however, this is not the ideal tool to design items for within a scrollviewer, since you still have the limitation of the screendisplayed.
Now I've been doing this in code, looking like the following:
- (void)addUserDetailViews
{
lblUserDetailTitle = [[UILabel alloc] initWithFrame:CGRectMake(20, 30, 280, 21)];
lblUserDetailTitle.text = @"User Details";
lblUserDetailTitle.font = [UIFont boldSystemFontOfSize:18];
lblUserDetailTitle.backgroundColor = [UIColor clearColor];
[self.scrollView addSubview:lblUserDetailTitle];
lblUserDetailBreakLine = [[UILabel alloc] initWithFrame:CGRectMake(20, 48, 280, 1)];
lblUserDetailBreakLine.backgroundColor = [UIColor cyanColor];
[self.scrollView addSubview:lblUserDetailBreakLine];
lblUserDetailId = [[UILabel alloc] initWithFrame:CGRectMake(30, 60, 120, 21)];
lblUserDetailId.text = @"ID";
lblUserDetailId.font = [UIFont systemFontOfSize:15];
lblUserDetailId.backgroundColor = [UIColor clearColor];
[self.scrollView addSubview:lblUserDetailId];
lblUserDetailDescription = [[UILabel alloc] initWithFrame:CGRectMake(30, 88, 120, 21)];
lblUserDetailDescription.text = @"Name";
lblUserDetailDescription.font = [UIFont systemFontOfSize:15];
lblUserDetailDescription.backgroundColor = [UIColor clearColor];
[self.scrollView addSubview:lblUserDetailDescription];
}
I can understand that this is not the best way to create an iPhone / iPad app..
Now i'm actually looking for a way to do this simply by the designer using the object toolkit.
The main reason i'm asking this is because i'd need to have about 50 rows.. and accomplishing that in this way, might screw things up for an iPad version or what ever.
Is there anyone who could tell me how to accomplish this?
Yours Sincerely,
larssy1