How to set stack background colour? [closed] - ios

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am working for iOS app using swift in XCode.
I need four clickable image views at bottom of the view. I have adjusted those in stack. Now I want to give a background colour to whole stack. Is there any option for this?
Thank you for help :)

You can't do this – UIStackView is a non-drawing view, meaning that drawRect() is never called. Its background color is not set. You can place the stack view inside another UIView and set background color value of that view.

Related

How to set color for home indicator element? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
If background is black, it isn't visible.
The home indicator color is determined automatically based on the color of the content below it.
Most of the time, this means you should not worry about its color since it is out of your control, and will always be clearly visible to users.
However, you can place a colored view in the area behind the home indicator to manipulate its color.
reference from :- https://medium.com/#nathangitter/reverse-engineering-the-iphone-x-home-indicator-color-a4c112f84d34

swift multiple buttons inside table view cell [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How to create view like in image to stretch to all width programmatically
https://cocoapods.org/pods/FlexLayout
I would recommend using something like FlexLayout. It handles laying views out however you determine that you want to lay them out, can handle changing widths, stacking in columns or in rows. Think if it similar to stack views the way you can lay them out. You don't need to use any constraints with this library. (I do not have any connection to the library at all).

Swift - set clickable area on UIImageview [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How could I define a clickable area on a UIImageview in swift ?
This area as to be fixed on the image even if I zoom or drag it.
Using the same technique as I recommended in this answer, add a gesturereconizer:
How to make whole call out tappable?
Add a button to the image via programatically (IBuilder doesn't allow that)
Set userInteractionEnabled = true on imageView
Set the button either via AutoLayout or using springs and struts approach to resize with imageview.

How to create animation like Apple Music app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Hi I want to create a view with lot of button in circle shape but want them arrange and animate like Apple music app as shown below, I can not post image you can view screenshot here one with red bubbles
I am not adding full code because there are number of things done, but here are the steps you can follow to create something similar.
You can create round button by setting there cornerRadius = height/2 provided both height and width are same, to make them scrollable add them in a scrollView and set contentSize of scrollView. You can add scaling animation to the each button i.e add CAKeyFrameAnimationfor key path transform.scale.y and transform.scale.x
We can also do this by using spritKit here is the component which do similar

Spacing between two barButtons in Navigation Bar-ios [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
iOS
I have three right bar buttons items in my navigation Bar.
I want to change the default spacing between them to zero, so that all the buttons stick to each other?
You can try adding a spacer (UIBarButtonSystemItemFixedSpace) with a negative value. See this answer for more details.
Another approach could be using a custom item with a smaller size than its content then allowing drawing outside out of its bounds using UIView.clipToBounds property.

Resources