Question

I recently switched from flash/flex development to IOS apps. The one thing I'm still struggling with is getting my UI components arranged the way I want them. I've tried using AutoLayout with constraints, but it feels really cumbersome, especially when there are a large number of components to arrange. What I want is something like the flex 'Form' and FormItem' components that provide a clean arrangement of labeled inputs. Can anyone point me to an equivalent solution for IOS?

Was it helpful?

Solution

I think I found what I was looking for here: XLForm

It isn't a perfect solution but I suspect it is as close as I'm going to get.

OTHER TIPS

I'm not sure what you exactly want, since I do not have any experience with Flex.

If you want a UIView to clip to its subviews you can use:

[view sizeToFit];

Or if you want to control your frame via code, you have to disable auto layout in the storyboard. After that you can alter any UIView's properties e.g.:

UIView * view = [[UIView alloc] init];
CGRect newFrame = view.frame;
newFrame.size.height = 100;
newFrame.size.width = 100;
newFrame.origin.x = 50;
newFrame.origin.y = 100;
view.frame = newFrame;

or:

UIView * view = [[UIView alloc] init];
CGRect newFrame = view.frame;
newFrame.size = CGSeize(100,100)
newFrame.origin = CGPoint(0,0)
view.frame = newFrame;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top