I am trying to download iOS5 sdk. The account I login with is an administrator account created for me by my team agent. I see 2 links, one is xcode 4 for lion and then xcode 4 for snow leopard, but when i click, i get access denied message. code P1 contact support ! when i try download xcode 4 for lion, it does not download rather says need 10.7, I am on 10.6.8 Whats d solution and is it that only team agents can download iOS5 sdk ?
Ok, thanks gentlemen,
Now a few case studies where I should know whther i am leaking or best practice shot off. Please advise, thanks in advance
I am doing a custom cell and using following code
Static analyser gives a warning "receiver of frame is nil and hence returns garbage CGRect" ? why so ? I lblText is an outlet and I am setting outlet through nib file. When I run the code, there is no problem in functionality, it is only that static analyser in sdk 5.0 shouts here.
Secondly,
If I have a few IBOutlets in a class, where should I call [outletobject release] ?
viewDidUnload or dealloc ? And where should I assign them to nil ?
if I have done alloc to a nonatomic retained variable in viewDidLoad where should I release them ? viewDidUnload or dealloc ?
in these cases static analyser is not shouting, though, I wanna do the best practice.
Also, if I am using
UIImage *img = [UIImage imageNamed
"myImage.png"];
after the usage is over, should i release img or not ?
Do I own img this way ?
regards
Ok, thanks gentlemen,
Now a few case studies where I should know whther i am leaking or best practice shot off. Please advise, thanks in advance
I am doing a custom cell and using following code
Static analyser gives a warning "receiver of frame is nil and hence returns garbage CGRect" ? why so ? I lblText is an outlet and I am setting outlet through nib file. When I run the code, there is no problem in functionality, it is only that static analyser in sdk 5.0 shouts here.
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"myCell";
MyCell *cell = (MyCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray * topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"MyCell" owner:self options:nil];
for(id currentObject in topLevelObjects)
{
if([currentObject isKindOfClass:[UITableViewCell class]])
{
cell = (MyCell *)currentObject;
break;
}
}
}
if(selectedIndex == indexPath.row)
{
CGFloat labelHeight = 100;
CGRect rct = [[cell lblText] frame];
[[cell lblText] setFrame: CGRectMake(rct.origin.x,
rct.origin.y,
rct.size.width,
labelHeight)];
[[cell lblText] setFrame:@"My Text"];
}
}
Secondly,
If I have a few IBOutlets in a class, where should I call [outletobject release] ?
viewDidUnload or dealloc ? And where should I assign them to nil ?
if I have done alloc to a nonatomic retained variable in viewDidLoad where should I release them ? viewDidUnload or dealloc ?
in these cases static analyser is not shouting, though, I wanna do the best practice.
Also, if I am using
UIImage *img = [UIImage imageNamed
after the usage is over, should i release img or not ?
Do I own img this way ?
regards