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

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -