xcode4 - Attempt to programmatically re-position UIImageView -


**updated question reflect addition of "init" in uiimageview alloc*** have "imageview" variable, declared in ".h" class. forced in particular case programmatically move "imageview" 10 pixels , have experienced no luck. in looking @ current uiimageview ("imageview) position, determined x/y/width/height should (78,214,170,120). below code working with, works displays no uiimageview/uiimage:

imageview = [[uiimageview alloc]init]; uiimage *image = [uiimage imagewithdata:[nsdata datawithcontentsofurl:[nsurl urlwithstring:img2string]]]; imageview.frame = cgrectmake(78,214,170,120);      imageview.image = image; 

i'd appreciate help.

you should initialize image view first

imageview = [[uiimageview alloc] init]; 

like above.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -