ios - How do I change the position of this element on the ViewController programatically? -
i have code in viewcontroller.m there no strobyboard/xib file fine on screen element comes in centre automatically. how add custom position it?
uiimageview *bgimageview = [[uiimageview alloc] initwithimage:_bgimage]; [self addsubview:bgimageview];
as far i'm aware should able add cgrectmake code somewhere can't figure out.
any suggestions?
bgimageview.frame =cgrectmake(x,y,width,height);
if want maintain previous values:
bgimageview.frame =cgrectmake(x,y, bgimageview.frame.sizewidth, bgimageview.frame.size.height);
Comments
Post a Comment