i created an iPad application, in which i am fetching data from URL,
when i write this code it shows me this warning initWithContentsOfURL is deprecated
here is the code snippet,
NSString *mainstr;
NSURL *urlr=[NSURL URLWithString:@"http://abc.com/default.aspx?id=G"];
NSURLRequest *reqr=[NSURLRequest requestWithURL:urlr];
[webViewq loadRequest:reqr];
mainstr=[[NSMutableString alloc]initWithContentsOfURL:urlr];
also in tableView it shows me this warning,initWithFrame:reuseIdentifier: is deprecated
here is the code snippet, in which i am creating one label inside each row
static NSString *CellIdentifier=@"Cell";
if(cell == nil){
cell=[[[UITableViewCell alloc]initWithFrame:CGRectZero reuseIdentifier:CellIdentifier]autorelease];
CGRect frame;
frame.origin.x = 0;
frame.origin.y = 0;
frame.size.height = 40;
frame.size.width = 180;
UILabel *capitalLabelI = [[UILabel alloc] initWithFrame:frame];
capitalLabelI.tag = CapitalTag;
capitalLabelI.font=[UIFont systemFontOfSize:16.0];
}
capitalLabelI.text=[@" " stringByAppendingString:[a objectAtIndex:indexPath.row]];
return cell;
and when i call multiple parametrized method, it shows me this warning,
method name:
-(void)recentquote:(NSString *)sym:(int)i
call syntex:
[self recentquote:l3:i];
warning:
Instance method '-recentquote::' not found (return type default to 'id')'
Help me guys !!
Thanks In Advance !!
the call syntax should be
(note at the space in between), I suggest renaming your function anyway.
when it say it’s deprecated, it simply means some time in the future, Apple might remove this method all together, it’s not longer supported. So change your
to
Check the documentation for available style and what it means
EDIT :
I suggest changing it, maybe to
then to call it use