Autolayout: origin and size should change according to width and height factor
As pre your question you can set this constraints to your UIButton.
You are not required to change the constraint which you have set for height and width of UIButton.
1.) You need to set horizontal space to Button.Leading and Superview.Trailing.
Set constant=0, Priority=1000 and Multiplier=100:320 as I've set in below image.
2.) You need to set horizontal space to Button.Top and Superview.Bottom.
Set constant=0, Priority=1000 and Multiplier=100:568 as I've set in below image.
Result
Hope this solves your problem.
Change view width with autolayout and size class enabled
If you want the dimensions of your view to follow the same width as the one of the iPhone it's running on, in Interface Builder, position the view, size it so that it basically looks as you want it to look, and then add the constraints, ctrl drag from your view to it's superview and add "Leading space to container margin" and "Trailing space to container margin" constraints.
Is it safe to change a view's frame if it has translatesAutoresizingMasksIntoConstraints=YES
If the view is configured with constraint-based layout, you shouldn't adjust the frames manually because it will get changed at the next layout pass. You can easily accomplish this by setting a maximum width constraint on the view.
If it's not configured with constraint-based layout, your current solution will work, although it's bad practice for a view to modify its own frame (a view's frame should be modified by its superview or its view controller).
AutoLayout to keep view sizes proportional
This can be resolved by adding one more dummy view(dummyView) with its constraints set to Fixed width, height and aligned to centerX of Superview.Then add left view and right view Horizontal spacing constraint to dummyView.
Autolayout proptional constrain not working properly iOS
As you have explained that you want to increase/decrease size of image according to device size.
I have tried to solve the issue. Refer http://s000.tinyupload.com/index.php?file_id=54760890874471716136
Hope this will help you.
UITableViewCell.contentView reports wrong width
Incase someone bumps into this, the culprit was the tableview. When I pinned it's edges to the superview, the cells started to work correctly.
Related Topics
How to Take a Snapshot of a Uiview That Isn't Rendered
How to Access Extension of Uicolor in Swift
Pass Uicollectionview Touch Event to Its Parent Uitableviewcell
Xcode5 Simulator: Unknown Option Character 'X' In: -Xlinker
How to Upload Multiple Image on Firebase Using Swift
Core Data Sum of All Instances Attribute
Using Wcsession with More Than One Viewcontroller
Fit Image of Random Size into a Uiwebview (Ios)
Change Status Bar Text Colour from White iOS 7/Xcode 5
iOS - Custom Table Cell Not Full Width of Uitableview
Multiple Localized .Strings Files in iOS App Bundle
Add a Navigation Bar to a View Without a Navigation Controller
iOS Application Using Facebook -- Rejected
Xcode 7 Beta 6, Dyld _Nsarray0_ Crash
Searching Through Child Values Firebase/Swift
Programmatically Sending an App to Background
Get Created Date and Last Login Date from Firuser with Firebase 3
iOS Facebook Sdk 3.1 Retrieve Friend Birthday Returning Null