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
6
votes
3 answers

iOS how to center two view via PureLayout

I want to center my UIImageView and UILabel like the pic below. I used a container to contain UIImageView and UILabel,but the container does not suit the width of UIImageView and UILabel.So I need to set the width of the container.Is there any…
Kevin Hawk
  • 308
  • 2
  • 10
4
votes
0 answers

Failed to rebuild layout engine without detectable loss of precision

I'm honestly not sure what's going on here, though I am getting this error multiple times in my Objective-C iOS app. I use PureLayout to layout most of my constraints. 2016-11-29 11:14:41.268847 App Name[4775:1882075] Failed to rebuild layout engine…
Edwin Finch
  • 913
  • 3
  • 10
  • 24
3
votes
1 answer

UISearchBar not getting centered when pinned below a UINavigationBar

I have this code below who configures the constraints of the view: func configNavigationBarConstraints() { navigationBar.autoPinEdge(toSuperviewEdge: .leading) navigationBar.autoPinEdge(toSuperviewEdge: .trailing) if #available(iOS 11.0,…
3
votes
2 answers

Pure Layout supporting right to left

Does iOS pure Layout support right-to-left languages? How can we implement it in the code for the arabic language without the need to go to setting and select the region and format language Thanks
Ziad Bou Ismail
  • 187
  • 2
  • 11
3
votes
1 answer

Subclassed UIView not visible, however content is visible

I subclassed UIView: http://pastebin.com/MVk1XmPS and when I add it to another view of a UIViewController: self.myView = MyView.newAutoLayoutView() self.myView.backgroundColor = UIColor.redColor() self.view.addSubview(self.myView) the red…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
2
votes
5 answers

label is not growing when the text is longer

I want a view that is centered in the superview but that grows due the content in this case a label. But I don't want it to grow that it doesn't fit in the screen anymore so thats why I pin the left and right. I've put on a test…
user1007522
  • 7,858
  • 17
  • 69
  • 113
2
votes
1 answer

Can't satisfy warning when linking against a dylib

I'm learning how to integrate a Today Extension for my application, but Xcode keeps throwing me the following warning: linking against a dylib which is not safe for use in application extensions: I'm using PureLayout to manage Auto Layout within my…
dispatchswift
  • 1,046
  • 9
  • 21
2
votes
3 answers

PureLayout in Swift with Cocoapods

Using cocoapods-0.37.2 Here's my Podfile: platform :ios, "8.0" use_frameworks! pod "GoogleMaps" pod 'FontAwesomeKit' pod 'PureLayout' I'm trying to import PureLayout in my .swift file like this: import PureLayout class ViewController:…
oleynikd
  • 896
  • 13
  • 33
1
vote
2 answers

UITableViewCell doesn't work unless I add views to a container view rather than contentView

Background This is in reference to this post (TLDR; UITableViewCell heights should be calculated automatically if you are using Auto Layout properly). Problem If I add the views directly to contentView, I keep on getting this error: 018-11-25…
abbood
  • 23,101
  • 16
  • 132
  • 246
1
vote
1 answer

is it possible to autolayout the width of the UISlider

I am using PureLayout to put a UISlider between 2 buttons as below: [self.slider autoPinEdge:ALEdgeLeading toEdge:ALEdgeTrailing ofView:self.leftButton withOffset:10.0f]; [self.slider autoPinEdge:ALEdgeTrailing toEdge:ALEdgeLeading …
chipbk10
  • 5,783
  • 12
  • 49
  • 85
1
vote
0 answers

Align Image to Top of label

I'm having a ImageView and a UILabel both aligned Top to Top. They are next to each other so I have the label and then right of it the textview. Now when there is text in the label the text first letter is lower then the top of the ImageView. I want…
user1007522
  • 7,858
  • 17
  • 69
  • 113
1
vote
1 answer

Trying to install Purelayout using cocoa pods in swift project

I am currently having problems installing Pure Layout using Cocoa Pods. Ive managed to install it fine in a blank project with no problems. But when installing into my project i keep getting the following error: ld: framework not found…
w007up
  • 21
  • 3
1
vote
0 answers

AutoLayout without usage of Storyboards or Interface Builder

I am building an app where I want to completely avoid using Storyboard and Interface Builder in general, so all UI should be specified in code. I am using PureLayout, a nice API for configuring AutoLayout constraints. However, my issue is that it…
nburk
  • 22,409
  • 18
  • 87
  • 132
1
vote
2 answers

Unable to set up a scroll view with PureLayout

I have the following viewDidLoad method implementation in a UIViewController subclass: var scrollView = UIScrollView.newAutoLayoutView() var contentView = UIView.newAutoLayoutView() override func viewDidLoad() { super.viewDidLoad() …
AppsDev
  • 12,319
  • 23
  • 93
  • 186
1
vote
0 answers

Custom UItableViewCell with PureLayout and dynamic number of buttons

I have created a custom UITableViewCell which display dynamic number of buttons in horizontal access using the following initWithStyle - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super…
Mohamed Saleh
  • 2,881
  • 1
  • 23
  • 35
1
2 3