Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 How to make CGRectMake horizontal center, Swift

views
     
TSalexa
post Feb 20 2015, 03:24 AM, updated 10y ago

Big Boss
******
Senior Member
1,456 posts

Joined: Jan 2009
From: mont kiara, kuala lumpur



How to make UIView horizontal center in view controller using CGRectMake and 30 from top?

CODE
var draggableView: DraggableView = DraggableView(frame:CGRectMake(0 , 30, 260, 260))
draggableView.center = center


Not successful. Please advice. Thank you.
malleus
post Feb 20 2015, 05:59 PM

Look at all my stars!!
*******
Senior Member
2,096 posts

Joined: Dec 2011
you on auto layout?
TSalexa
post Feb 25 2015, 02:23 PM

Big Boss
******
Senior Member
1,456 posts

Joined: Jan 2009
From: mont kiara, kuala lumpur



[SOLVED]

 

Change to:
| Lo-Fi Version
0.0134sec    0.30    5 queries    GZIP Disabled
Time is now: 28th March 2024 - 08:22 PM