objective c - why does this code keep coming up with errors. xCode 4.6 -


nsimagecell *imagefrombundle;      nsdata *imagedata;      nsurl *imageurl = [nsurl urlwithstring:@"http://www.greatwhatsit.com/wp-content/uploads/2012/03/jeremiah1.jpg"];      nslog(@"url");      nslog(@"data");      nsimage *imagefrombundle = [[nsimage alloc] initwithdata:imagedata];  

why doesn't code work. xcode 4.6

you have have same type definition , init of imagefrombundle

nsimagecell *imagefrombundle; nsimage *imagefrombundle = [[nsimage alloc] initwithdata:imagedata]; 

change to:

nsimage *imagefrombundle; nsimage *imagefrombundle = [[nsimage alloc] initwithdata:imagedata]; 

also, zakhej sais, need init imagedata


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -