I would like to have two UIButtons side by side in a UIStackView both at 50% of the view. When I drag two buttons into the Stack View, the first one takes up the majority of the view and the other is the smallest width it can be.
Should I be doing something else?
Thanks
UIStackView Layout
896 Views Asked by Tom Coomer At
3
There are 3 best solutions below
Related Questions in SWIFT
- Overlapping UICollectionView in storyboard
- Cannot pod spec lint because of undeclared type errors
- Swift code with multiple NSDateFormatter - optimization
- How do I add multiple in app purchases in Swift Spritekit?
- cellForRowAtIndexPath and prepareForSegue return different label colors
- Getting this message in my console in xcode "Ignoring restoreCompletedTransactionsWithApplicationUsername: because already restoring transactions"?
- Change background of an Accessory View in a UITableViewCell
- fade in an bounce animation subview
- Create a PFObject and PFRelation after PFUser Sign Up
- Swift 2 - Pattern matching in "if"
- How do I give inputs through NSURL
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- Compiler complains that 'Expression resolved to unused function' when removing index in array of functions
- Cast from 'Int?' to unrelated type 'NSNumber' always fails
Related Questions in UIBUTTON
- Image and Text locations in UIButton
- How to change position of UIButton?
- Set Background Color on UIButton when Disabled?
- Checking UIButton Image
- If statements for code generated buttons, Swift
- Trouble using UiButton as toggle switch
- Mutable global methods?
- Will handling UIButton touch event inside a UITableViewCell subclass violate MVC?
- Setting frame for UIButton ignored
- UIStackView Layout
- How to vertically center two views & divide the width equally relative to the super view?
- Multiple Buttons, But only one pressed at a time
- Customize the UIButton resize according to text length and place UILabel after that
- UITableViewCell reload selected image with pattern image
- Calling prepareforSegue from a UIButton?
Related Questions in XCODE7
- BETA iOS9 deployment to test devices
- How to make a CocoaPods project work on OS X El Capitan & Xcode 7 Beta?
- XCODE 7 App on Device Crashing
- What does ENABLE_BITCODE do in xcode 7?
- Sorted is not working in Xcode 7
- iOS9 with Xcode 7 beta breaks AFNetworking
- Registering for local notification returns UIUserNotificationTypeNone after user chooses "Allow" on iOS9
- Submit apps in appstore with xcode7
- How to run apps on iPhone/iPad using Xcode 7 without enrolling to Apple's Developer Program?
- Install app on iOS without Apple Developer Program (Xcode 7)
- Xcode 7 beta NSURLConnection error
- Linking error when building Parse in Xcode 7
- adding framework to Xcode 7
- UIStackView Layout
- SpriteKit SKSprite only displaying if asset is on "Universal"
Related Questions in IOS9
- BETA iOS9 deployment to test devices
- CFNetwork SSLHandshake failed iOS 9
- Can UIStackView also be used within a UITableViewCell?
- XCODE 7 App on Device Crashing
- iOS9 with Xcode 7 beta breaks AFNetworking
- Registering for local notification returns UIUserNotificationTypeNone after user chooses "Allow" on iOS9
- NSURLSession/NSURLConnection HTTP load failed on iOS 9
- How do I load an HTTP URL with App Transport Security enabled in iOS 9?
- Find User Name or First/Last Name in iOS9 CloudKit / ABPerson (ABAddressBook)
- Install app on iOS without Apple Developer Program (Xcode 7)
- Xcode 7 beta NSURLConnection error
- Linking error when building Parse in Xcode 7
- Swift 2.0 Core Spotlight API - search only for title
- UIStackView Layout
- Is it possible to opt your iPad app out of multitasking on iOS 9
Related Questions in UISTACKVIEW
- Can UIStackView also be used within a UITableViewCell?
- UIStackView Layout
- What's the difference between a UIStackView And A UICollectionView in Xcode 7?
- Add views in UIStackView programmatically
- how to use Stack View of object library in Xcode 7
- UIStackView properties according to size classes
- Slider in a stack view wants to resize
- Can UIStackView support iOS 8 or 7?
- How to set dynamically spacing between elements in UIStackView?
- UIStackView not centering arrangedview
- StackView insertion offset issue
- Is there any way to alter line spacing/margins/padding for a UITextView inside a UIStackView?
- Swift 3 - Sliding stack views?
- How do I set UILabel in stackview to zero when It has no strings
- Any way to dynamically adjust the height of a UITextView inside a UIStackView inside a UITableViewCell?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

You are doing right, but you may missed to do below thing.
You need to set the
UIStackViewDistribution&UIStackViewAlignmentproperty as per your need.The
distributionproperty determines the layout of the arranged views along the stack’s axis.The
alignmentproperty determines the layout of the arranged views perpendicular to the stack’s axis.Refer this for more info.