1
vote
1answer
43 views

iOS - Testing User Interface (Auto Layout / Layout Constraints)

I am looking for best practices, advice, and insight on how to test a user interface that leverages layout constraints. My view controller subclass is displaying "leaf-level" data - for sake of ...
0
votes
1answer
26 views

Evenly Space UIViews of equal sizes in superview using Auto Layout in iOS 6

I am in a need of having the series of buttons to be evenly placed in superview Horizontally using Auto Layout. Here, I want to keep the sizes of the subviews same, only the center of the subviews ...
0
votes
1answer
34 views

How to create labels with dynamic size in iOS 6 with autolayout

I'm having trouble with autolayout and labels that get their text set in the source code based on some external conditions. These layouts (portrait and landscape) look like this on the simulator: ...
2
votes
3answers
50 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
4answers
64 views

UILabel sizeToFit doesn't work with autolayout ios6

How am I supposed to configure programmatically (and in which method) a UILabel whose height depends on its text? I've been trying to set it up using a combination of Storyboard and code, but to no ...
0
votes
1answer
34 views

UIScrollView contentSize autolayout constraint issue

Here's the situation. I have an UIScrollView that uses autolayout that successfully adjust to the screen when I rotate it, my problem comes with the scrollView's content that doesn't adjust. The ...
3
votes
1answer
76 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
37 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 ...
0
votes
0answers
50 views

Programmatically attempting NSLayoutContraint gives “Unable to simultaneously satisfy constraints.”

I seem to be having some problems settings up my constraints programmatically for a UITableView I am using. My attempt is below, and have tried every combination of using the ...
0
votes
1answer
26 views

Aling UIView to a UIToolbar using autolayout

I trying to align an UIView to the bottom of a container view(UIScroolView) and above a tool bar. It works perfectly when design to the iphone 3.5 display but when a change my layout to the 4.0 ...
0
votes
3answers
178 views

iOS Autolayout - How to set two different distances between views, depends on the screen height

I know I'm missing something, because this has to be something easy to achieve. My problem is that I have in my "loading screen" (the one that appears right after the splash) an UIImageView with two ...
-1
votes
1answer
41 views

How to properly add a uiscrollview [closed]

Ok so while developing my app I´ve overcome so many kind of troubles. But what gets me in troubles every time I use its the scrollView (I think this may be caused by autolayout, but this is just my ...
0
votes
1answer
25 views

Spacing between labels not updated when using sizetofit and landscape

I have two UILabel's separated by a spacer, expressed like this in visual format language. @"V:[label1]-[label2]" When label1's text changes i call: [label1 sizeToFit]; In portrait mode label2 ...
0
votes
1answer
159 views

TableView Cell contents not shifting in editing mode iOS 6

I have subclass of UITableViewCell. Here is my setup I have used Autolayout. Now when user swipe on cell , I can see "Delete" button , but it overlaps my right side imageview. Cell contents are not ...
0
votes
1answer
112 views

IOS - Centering UIScrollView inside UIView container programmatically with Autolayout issue

I'm trying to replicate the safari pages scrollview, which has its frame that is slightly narrower than iPhone screen. So According to few suggestions I'm placing a the scrollview (450x280 points) ...
2
votes
3answers
139 views

Use Auto layout or not iOS 6.x

I'm developing an app with Storyboard on iOS 6.1 (with many features - star ranking, sqlite DB, apple maps, etc..). Sometimes It happens that I have to disable the auto layout (for UIScrollView for ...
2
votes
2answers
59 views

Centering two buttons with Cocoa Auto Layout

I have a problem with Cocoa Auto Layout and can't get my head around this problem. All I'd like to achieve is to have two buttons always centered in a view as depicted below. I've tried lots of ...
3
votes
1answer
177 views

Why does auto layout in table view cells cause the table's content size to be incorrectly changed?

I'm using Xcode 4.6.1 and I have an iOS 6.1 app. It has a table view that drills down into another table view. The second table view uses custom cells to display its data. However, there is a problem ...
0
votes
1answer
339 views

From May 1 - iPhone 5 support - then what is the minimum iOS version appstore supports?

Apple posted in its developer news - "starting May 1, new apps and app updates submitted to the App Store must be buit for iOS devices with Retina display and iPhone apps must also support the 4-inch ...
0
votes
0answers
90 views

Grouped UITableView height shrinks in NSAutolayout iOS 6

I have grouped uitableview in my view controller & its constraints are as shown below Now in viewDidLoad I made web service call to get the data from server. I am using pagination. When 2/3 ...
0
votes
1answer
60 views

AutoLayout works for UIView but not for UILabel. Why?

Desired Scenario: create a custom Alert View via iOS6's AutoLayout vs Frames: 1) Create an empty UIView upon the host view (UIController.view): alertView = [[UIView alloc]initWithFrame:CGRectMake(0, ...
0
votes
1answer
61 views

Is there a way to get the 'Visual-Format Language' of AutoLayout XIB?

I'm slamming into brick walls. Is it possible to get the Visual-Format Language generated from an AutoLayout XIB? I wish to emulate the XIB equivalent in code.
0
votes
1answer
27 views

Gracefully hiding and showing views when using Auto Layout in iOS 6

I thought there might be a way to easily hide and show a button in a row using auto layout so that views could be automatically arranged neatly depending on which are visible. For example, say I ...
0
votes
1answer
50 views

Keeping a UILabel centered with changing contents and AutoLayout

I have 2 views. A MapKitView and a UILabel. Auto Layout is on. I want the MKView to take up the whole screen (this seems to work fine) and the UILabel to remain the auto distance from the bottom of ...
0
votes
0answers
69 views

Problems with a UICollectionView as the first viewController of UISplitView

Hi all iOS developers :) First of all some important things. I'm using autolayout, and loading the UICollectionViewCell subclasses from a nib file. I don't change the size of cells or do some dirty ...
1
vote
1answer
21 views

Layout doesn't change after modifying constants

I have a UIView on my UIViewController. I set width and height using Editor -> Pin -> Width/Height. Also i created IBOutlet of these constraints to change widht and height programatically. I worte ...
0
votes
1answer
160 views

Dynamically change label and cell size by text length

I have a table with a prototype cell. My project uses auto layout. The cell holds some labels, theit text length can be various. Sometimes it is too length to fit in its default size. What I'd like ...
1
vote
0answers
40 views

iAd Autolayout Issue after clic

I have some layout problem when i clic on "Test advertiser" iAd Banner : I don't understand because everything is well displayed before i clic on the banner. I'm using auto layout. Here's my ...
0
votes
1answer
42 views

Put a view in the bottom of another view with a fixed size

Sorry folks if my question seems to be trivial, but xcode drives me crazy. I don't want anything else, just put a view in the bottom of a view controller in XCode by IB, that has FIXED height even if ...
0
votes
1answer
167 views

My UIScrollView doesn't work with auto-layout in ios6

I have put an UIScrollView in my UIViewController into my storyboard. When I use this code: - (void)viewDidLoad { [super viewDidLoad]; [_scrollview ...
0
votes
0answers
87 views

How to set auto layout for two adjacent UIViews with UILabel in each?

Main view of the ViewController consists of two UIViews, each UIView consists of an UIImageView and UILabel. As text in UILabel Increases, its parent view should resize. and even the view adjacent ...
0
votes
1answer
151 views

UIImageView: use all available space via auto layout

I'm trying to use Auto Layout to minimize the gap between a UIImageView (in green) and a UICollectionView (in red). In the simulator (which I assume is showing an iPhone 4-size screen) the two views ...
0
votes
2answers
53 views

Autolayout expand label when press button

I'm developing iOS 6 application and using Autolayout. My interface is very simple: label and button verticale aligned. Label has very long text but it's height is set to 50. I want to expand the ...
0
votes
1answer
53 views

Using ios6 constraints with iAd

I would like to use constraints to layout my view... It should look like this : In Portrait mode : In Landscape mode: My code so far is for constraint: [self.view ...
1
vote
1answer
164 views

ios6 autolayout constraints

I'm trying to figure out how to use constraints on a UIViewController (inside a UITabBarController which is inside a UINavigationController)... More than a thousand words, here's what I'm trying to ...
2
votes
1answer
295 views

iOS 6.0 AutoLayout issue with constraints: subviews disappear when rotated

Hi I have designed a XIB using AutoLayout constriants to display two rows of buttons, with three buttons in each row, as shown in the screenshot (I'll place the buttons in the Red UIViews after I get ...
0
votes
1answer
108 views

Layout created in 4 inch screen gets messed up in 3.5 inch screen even when using Auto Layout

I have a simple login screen. It looks fine on the 4-inch screen. But when I run it in the 3.5-inch screen, as you can see the bottom part gets cut off. I have Auto Layout turned on and below ...
1
vote
1answer
166 views

Auto-layout constraints for landscape/portrait on 3.5 & 4 inch forms. UIImageview UITextView

Using XCode 4.6 and trying put a single UIImageView and single UITextView on an iPhone screen for both 3.5 & 4 inch form factors rotatable between landscape or portrait. For Portrait I'd like the ...
0
votes
1answer
304 views

UILabel sizeToFit only works with AutoLayout turned off

So I am making an app using iOS 6 and was wondering why my code that used to work great on iOS 5 does not work anymore. I have a cell with dynamic UILabel that gets adjusted based on the text that it ...
2
votes
1answer
279 views

Custom UITableViewCell's subviews using auto layout - no xibs, all in code

Custom UITableViewCell's subviews added in code using auto layout works (verified). However the whole point of doing this was to not have to calculate the height of each tableview cell and the ...
0
votes
1answer
68 views

TableViewCell “Will NOT” indent in editing mode?

I am working on an iOS6 build in Xcode (newest version) while in Interface Builder I have created a custom cell with just a few labels for now. I am wanting the labels to "indent" instead of getting ...
1
vote
1answer
143 views

Fixed view width for Portrait and Landscape orientations with Storyboard and Auto Layout?

I'm working on this iPad app and I'm thinking of using auto layout to make my life easier. I created this side bar control that allows users to change to a different page (just like the tab bar ...
1
vote
3answers
206 views

UIScrollView showing only part of UIView after rotation

This is my first post to Stack Overflow, and I'm a iOS beginner, so please bear with me! I have an example app where I have three UIViews (headerView, scrollViewContainer, and bodyView) in a parent ...
3
votes
1answer
301 views

Auto Layout UILabels

I have three UILabels in my custom UITableViewCell. It might be that some UILabels will be empty (label.text == @"") - (UITableViewCell *)tableView:(UITableView *)tableView ...
0
votes
0answers
257 views

Resizing a cell with Auto layout IOS6

Is there anyway to resize a cell in UICollectionView when change from portrait to landscape mode? With the new IOS6 auto layout? I don't want to reload the whole UICollectionView. Hi guys found the ...
0
votes
0answers
52 views

ios - running the 3.5 inch emulator makes some of the page elements be spaced incorrectly

I have an app which I made using storyboards. It looks fine when I run the app on the 4-inch iPhone emulator, but when I change the emulator to 3.5 inch, it shifts some of the page elements. Here is ...
0
votes
2answers
48 views

Positioning UI controls without relying on centers

I'm creating a sample login screen to practice Auto Layout. In portrait mode, it looks like this. However when I rotate to landspace mode, it looks like this. Below are the constraints I have ...
0
votes
2answers
63 views

Should I have two nibs to give support to the screens for iPhone 5 / iPhone 4?

I started to work in an App that needs to be optimized for iPhone 5 and requires iOS 5.x or later. But the scenario where the user has and iPhone 4 with iOS 5.x is possible. But the Autolayout will ...
1
vote
1answer
100 views

iPhone5 storyboard autolayout

I am writing an iOS app using autolayout. I want to place a button at the 30points below from screen Y center. How can I add constraints for this?
2
votes
0answers
73 views

Autolayout Constraint Error with a single constraint

I have a scence with a bunch of labels and buttons. When you tap on a button a view slides up from the bottom with controls in it, a kind of keyboard so to say. It "looks" like this: ...

1 2 3
15 30 50 per page