autolayout

iOS iPhone 6 Autolayout - Full Width and Height

与世无争的帅哥 提交于 2019-12-25 04:32:15
问题 I designed my app to work on iPhone 5 and now want to make it compatible with iPhone 6 screens. When I change the simulated metrics size to iphone 5.5 inch in the storyboard, I see that my view is no longer the full width and height of the screen. How do I specify that the width and height should be the full screen dimensions? 回答1: Don't change the simulated metrics. Just pick one (iPhone 5 is good, or you can even go with the default 600x600 layout) and leave it there. Make sure auto layout

iOS Autolayout : Dynamically adjust controls

江枫思渺然 提交于 2019-12-25 03:08:49
问题 I am practicing autolayout, I have struck on some issue, My layout is like == Username TextField == == Password Textfield == ==Login Button == But when user enters wrong username or password it should be changed to == Username TextField == == Password Textfield == == Verification Textfield == ==Login Button == I know how to achieve it by setting frames but I want to do it by autolayout and constrains So I need your help to do it. And it would be great if I can do it using storyboard without

Autolayout - How to Change width spacing between iPhone 6 and Plus

二次信任 提交于 2019-12-25 02:59:42
问题 Ok, I have been pulling my hair out for a few days now and thought I would ask the community how to deal with width sizes or the gaps between buttons in xcode 6.4 or 7 (tried them both). Ideally I want 2 buttons near the bottom and they need to scale properly based upon iPhone portrait mode. I have added the 1x, 2x, and 3x pngs of the button to the asset system and my auto layout is set for wCompact hRegular which from what I understand allows you to target all iPhone devices in portrait mode

View not updating when autolayout constraint modified programmatically

梦想的初衷 提交于 2019-12-25 02:54:07
问题 I'm having trouble getting my view to lay itself out properly after modifying a second constraint (the first works fine). I'm modifying one constraint, animating it, and then modifying another constraint in the completion block (without animation). My reason for doing this is I don't want the second constraint change to affect the animation, but I want it to instantly take effect as soon as the initial animation completes. The problem is the second constraint change is simply not taking

Reordering Custom Cell Causes the Constraints to get Messed Up

删除回忆录丶 提交于 2019-12-25 02:35:13
问题 I have a custom cell which has a reordering problem that looks like this: Whenever I try to change the position of the cell, a weird thing happens, where the constraints break and half of the cell goes off screen then, when I exit editing mode, the cell diminishes into a small rectangle in the middle of the place where the cell used to be. This is the console message which comes when I try to reorder a cell. Unable to simultaneously satisfy constraints. Probably at least one of the

Reordering Custom Cell Causes the Constraints to get Messed Up

与世无争的帅哥 提交于 2019-12-25 02:35:08
问题 I have a custom cell which has a reordering problem that looks like this: Whenever I try to change the position of the cell, a weird thing happens, where the constraints break and half of the cell goes off screen then, when I exit editing mode, the cell diminishes into a small rectangle in the middle of the place where the cell used to be. This is the console message which comes when I try to reorder a cell. Unable to simultaneously satisfy constraints. Probably at least one of the

Setting constraints to UIScrollView

柔情痞子 提交于 2019-12-25 02:32:13
问题 Need some help to set constraints to UIScrollView. I tried to follow the instructions here: https://developer.apple.com/library/ios/technotes/tn2154/_index.html (Mixed approach). Setting 4 sided constraints to UIScrollView. Then set 4 sided constraints to the buttonContainer. This the result: However xcode is giving this error message: If I try xcode's recommendation, either the scrollview will not scroll, or it doesn't display at all. Any idea what's wrong here? 回答1: The messages you are

Hide View and reposition other View with Autolayouts

早过忘川 提交于 2019-12-25 02:16:49
问题 So guys, I have a profile view that contains several informations. Some of them don't have to be set e.g. Biografie. So depending if its set, I would like to hide the Biografie View (checkout screenshot) and reposition the UserData View and the ActivityData View AND change the Size of their superview to fill the space made by the Biografie View. Here is my actual structure of my TableViewHeader: The other point that i have to care about is that, the UILabel have to be mutliline and fit its

auto-layout in GraphStream, node position

℡╲_俬逩灬. 提交于 2019-12-25 01:40:04
问题 I am using GraphStream, to generate some graphs. I have following questions: When I use auto-layout in the library, is it possible for me to obtain the position information of each node? Can I change the type of edge? e.g. the default edge type is solid line. Can I change edge into dash line, or other type? Thanks. 回答1: For the first question I would advise you check the GraphStream website and especially the FAQ on the subject. For the second question, see the visualisation tutorial as well

Autosizing UICollectionView cell embedded in UITableView not working

痞子三分冷 提交于 2019-12-24 19:32:53
问题 I have spent a few day's now trying out things suggested on various SO posts but have not been able to figure this out. I'm probably looking right at the issue! I am making a switch over from Android to iOS and seem to be having some trouble with autolayout. Specifically, getting the UICollectionView to resize to the height of its content. Each collection view can have a different cell size based on its content but the cell size will be the same for each item on a given row. The