0
votes
1answer
19 views
how to minimize frame using NSLayoutConstraints in autolayout?
I am working on autoLayout in iOS6. I wanted to reduce(minimize) size(frame) of UIView. Currently my view is 320X480. I wanted to make it 160X240 keeping center point as it is.
Added ...
0
votes
1answer
19 views
intrinsicContentSize vs. sizeThatFits. What's the difference? What are the use cases for each?
I understand that intrinisicContentSize is part of the AutoLayout API, but other than that, I'm seeing lots of functionality overlap between it and the -sizeThatFits method.
In what circumstance ...
0
votes
1answer
58 views
UIView postion changes in retina display
I added a subview named LayoutView in my viewcontroller. LayoutView then added a subview named SectionView by the given code:
MSSectionView *sec1;
sec1 = [[MSSectionView ...
0
votes
1answer
61 views
+50
AutoLayout constraints for a autoresizing view created in ViewController's loadView
My ViewController creates his view by overwriting the loadView method:
- (void)loadView {
UIView *view = [[UIView alloc] init];
view.autoresizingMask = ...
0
votes
1answer
25 views
UIImageView within UIView doesn't respect constraint
I have a UIView of size width: 285 and height: 243. Within that view, I have a UIImageView (it is within that UIView according to Storyboard). That UIImageView has width 283 and height 241 (so that ...
0
votes
2answers
44 views
Evenly spacing several rows of an arbitrary number of elements using NSLayoutConstraints
I have a question about using layout constraints for the following scenario. Everything is in code (no nibs or storyboards). I want to create a view that contains an arbitrary number of rows of items. ...
1
vote
3answers
37 views
Why does a constraint for the UIViewController.UIView to child UIViewLabel through error “Invalid pairing of layout attributes”?
I am trying to position a label so that the top of the label is 2/3 the way down the UIViewController. So I wrote this constraint, but it gives me the error below.
NSLayoutConstraint ...
0
votes
1answer
29 views
Center subviews horizontally with auto layout
I have two subviews, an UILabel and an UIImageView, which I would like to center in a view. They should be placed next to each other and together they should be in the center of their superview whose ...
1
vote
1answer
79 views
UIScrollView contentsize is reset to zero when using auto layout [duplicate]
I'm using autolayout to change the height of my scrollview. I add some subviews to the scrollview where I manually increment the content size. But when I get an event where I am about to change the ...
2
votes
3answers
57 views
Moving elements when changing UIView frame
I have few UITextView's. Every TextView changes it's sizes on focus - it grows about 50px with animation like this:
[UITextView animateWithDuration:.1f animations:^{
CGRect new_frame = ...
0
votes
1answer
27 views
NSWindow's top position is jumping during resize (auto layout)
I do heavily use auto layout in my new project, but I've got one issue related to NSWindow during resizing ...
NSWindow is borderless window,
during initial setup, frame of this window is set based ...
0
votes
1answer
71 views
Auto Layout with UITextField causes exception
I'd like to position a UITextField inside a UIViewController view using auto layout (dynamic resizing and a 5 pt margin between the textfield and its superview). I create the view programmatically ...
3
votes
2answers
71 views
Develop for iPhone 4 or 5 First [closed]
I've searched every combination I can to try and find an answer for this, as I'm sure it's been asked somewhere....so forgive me if you can just point me in the right direction.
If you're developing ...
3
votes
1answer
90 views
CGRectMake doesn't work for custom frames in viewDidLayoutSubviews
This is the code I'm using:
-(void)viewDidLayoutSubviews{
CGSize screenSize = [[UIScreen mainScreen] bounds].size;
if (screenSize.height <= 480.0f) {
self.img.frame = ...
-1
votes
1answer
51 views
iPad iOS6 where to find Autolayout programmatically example project
I'm looking for an example xCode project that can demonstrate how to apply autolayouts to UIViews programmatically. I see quite a lot of questions that deal with how to apply autolayout, but I'm a ...