Questions tagged [pure-layout]

The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. PureLayout extends UIView/NSView, NSArray, and NSLayoutConstraint with a comprehensive Auto Layout API that is modeled after Apple's own frameworks.

PureLayout is a cross-platform Objective-C library that works (and looks!) great in Swift. It is fully backwards-compatible with all versions of iOS and OS X that support Auto Layout.

PureLayout provides a fully capable and developer-friendly interface for Auto Layout. It is designed for clarity and simplicity, and takes inspiration from the AutoLayout UI options available in Interface Builder while delivering far more flexibility. The API is also highly efficient, as it adds only a thin layer of third party code and is engineered for maximum performance.

Source

41 questions
0
votes
2 answers

Trying to set auto constraint on label, failing on long text

I'm trying to display rows containing a thumbnail and a title. It works great for short title strings, but for long strings, it breaks. Rather than expanding horizontally, I would prefer it to expand vertically. Checkout the screenshot below to see…
user339946
  • 5,961
  • 9
  • 52
  • 97
0
votes
1 answer

Frame of UIView doesn't change after auto pin edges to SuperView (with PureLayout - ObjectiveC)

My parent UIView has a frame (0,0,1024,768). My subview with the original frame is (0,0,0,0). I add the subview to the parent view and then use PureLayout to spread the subview to fullscreen of the parent view as follow: CGRect f1 =…
chipbk10
  • 5,783
  • 12
  • 49
  • 85
0
votes
2 answers

PureLayout is not threadsafe

I subclass UITableViewCell and use PureLayout to apply constraints but the app terminates with the error "PureLayout is not thread safe, and must be used exclusively from the main thread". In the function... …
abcf
  • 685
  • 2
  • 10
  • 25
0
votes
3 answers

Moving UIView inside NavigationController not working

OK, so I am trying to implement an add comment box in my view. Here is the layout: I have a UITabBarController containing a UINavigationController where my UIViewController is pushed to. The View Layout consists of a UITableView and a custom UIView…
hawkstrider
  • 4,141
  • 16
  • 27
0
votes
1 answer

Vertically aligning a label with PureLayout

I have a simple UIView subclass that contains a label. This subclass has the following init method: override init(frame: CGRect) { super.init(frame: frame) self.autoSetDimension(.Height, toSize: 44) titleLabel.backgroundColor =…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
0
votes
1 answer

Why is this view centered horizontally when its aligned to a vertical axis

Okay so I am new to the Swift programmming language and IOS platform however I have a strong background in mobile development on other platforms such as Android/WP/Xamarin so I decided to just dive in and learn the layout system starting with Auto…
Joel Dean
  • 2,444
  • 5
  • 32
  • 50
0
votes
1 answer

How to add a random view in real time when using Pure Layout

I'm using PureLayout in my iOS app and I'm following the instructions here: https://github.com/PureLayout/PureLayout/wiki/Tips-and-Tricks That is, using a flag called didSetupConstraints and the method updateViewConstraints. But now I would like to…
Ricardo
  • 2,831
  • 4
  • 29
  • 42
0
votes
1 answer

Embedded a view and resize it

i'm having a problem with embedded views and auto layout. I've created a view, which is a little complex. So now I want to refactoring this view and create some view components. I got one of the views and take together in one uiview class, and put…
0
votes
0 answers

How to display an image with PureLayout in a custom UITableViewCell?

I am creating an image polling app on iOS. The feed will be instances of the entry similar to the posted image(without borders). I created a custom UITableViewCell using PureLayout. However, the image (which is loaded asynchronously) doesn't show…
Ahmed Nawar
  • 1,315
  • 2
  • 9
  • 16
0
votes
1 answer

Swift autolayout: update view's dimension

I'm using PureLayout I'm doing all the layout by code, by the way. I have a UIScrollView that functions like Facebook's news feed. My scroll view has some subviews. Let's call 'em "cards". I've set my constraints inside updateConstraints as…
ton
  • 1,143
  • 3
  • 13
  • 34
0
votes
1 answer

Width of contentView in UITableViewCell is different for each cell

In an UITableViewController defined in a Storyboard with Auto Layout enabled, a UITableViewCell subclass is created programatically (no IB prototype cell) and sets constraints through updateConstraints using PureLayout. For some reason, the table…
Kof
  • 23,893
  • 9
  • 56
  • 81
1 2
3