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
Post a Comment