I am developing a simple iPhone app in Swift I have a customUITableViewCell. In the cell I have a normal UIButton with text of "Hello World". In my code for the custom cell, I have the following function: @IBAction func buttonAction(sender: AnyO
I have a function that chooses a randomUIButton and sets its character to a certain emoji. I want to now set the remainingUIButtons to be random emojis. How would I determine whichUIButtons were not set from the random generator assigning one a value
I'm having some problems trying to make a UIButton showing a different ViewController. On my 'menu'-ViewController I have two buttons both showing the 'game'-ViewController. The strange thing is, one of them does work like desired, while the other on
I have created an instance of UIButton and want to set the title color for Normal state, Selected state and Highlighted state. And I am doing so as- [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; [button setTitleColor:[UICol
There are 2 strings separated by a space forming a UIButton title. The button frames cannot be changed. Device is iPhone portrait only. How can I dynamically control the lengths of the 2 strings based on the requirements? Requirements - Second string
I have a simple UIButton that i want to change its image with animation. What happens is that it changes right a way, without delay or animation : [UIView animateWithDuration:1.5 delay:2.0 options: UIViewAnimationOptionCurveEaseInOut animations:^{ [b
I'm trying to replicate a button like the one below (YO ap) this button floats just above the table view, the view is perfectly round though, you can see this by how the k letters sticks out perfectly from underneath. Is it possible to create a circu
I have UIBUtton in UICollectionViewCell as show in image. I had set touchUpInside Action in xib. I had set background image of button is pink and lable as yellow. UIButton comes at top of the label. Now the problem is that UIButton in not getting tou
I want to get the background image name of the button when taping it. After searching a lot in internet i found that Since UIImage does not store the name of the image it contains, . We have to store the name elsewhere by yourself in relationship to
I was able to add a "setbackgroundimage" to my UIButton in my array. Now all buttons have the same image. How do I create a switch statement to be able to set a different image for each initwithobjects @"" in my NSarray? Below is the code I'm using:
I know my case may be rare but how do you disable the UIButton tint colour in this case? I have a customised UIButton which has attributedTitle to help display the button pattern in different colour and alpha. In my customised button .m file I have s
I have n number of buttons in the scrollView. If click on a button its text color is changing but if I click another button the text color of the previous button remain unchanged. I want to change the previous button text color as default color while
I need to pass string data with button, like tag, how can I do so? [button setTag:tg]; tg is nsstring. Maybe use other property and not tag? --------------Solutions------------- Use Associated Objects @interface UIButton (Tagged) @property (nonatomic
I have a button that is disabled in my view controller. I have IBActions for when two text fields are edited. I am trying to enable the button when two text fields both contain integers. I have tried to do this, but whenever I run the ios simulator,
I am having a IBAction for 4 buttons which represent 4 available answers and each time I press a button I read the sender ID, then it figures out if answer is correct and so on. Now I have a special case, when another button (nothing in common with t
I have a custom view on which I have a UIButton. I am trying to do a simple animation in which the button should get half in size within a second of pressing the button. However the problem is that button is not animating I have checked the action me
I have two Scenes in my storyboard, the first simply contains a UItable populated by an array of words. When a cell is selected my app segues to the second scene that contains a label (which is given content of its corresponding "wordTitle", see belo
I have some UIButtons inside a UIScrollView. When the view first loads there are about 8 buttons showing in the UIScrollView, all these buttons are visible and clickable. However, once I scroll, any button that wasn't there when the view initially lo
In a UIButton subclass: - (void) setHighlighted:(BOOL)highlighted { [super setHighlighted:highlighted]; if (highlighted) { self.backgroundColor = [UIColor redColor]; } else { self.backgroundColor = [UIColor blueColor]; } } - (void)setSelected:(BOOL)s
I am having three button in a view, when user clicks on the first button, a new view appears next to the first button, again clicking the first button view will disappear. I want to move down the remaining buttons down when the new view appears. I am