Hi,
I have run-time created buttons in a View, placed in a grid-looking way. Now I want the user to have the possibility to delete each and every one of them by choosing. How can I identify to one the user have chosen to properly delete it out from View? I use Tag property in the creating process.
Thank you.
...
I have a grid of images/buttons, and I want the user to be able to drag their finger over the images/buttons such that when their finger touches each image/button an event is called.
How do I do this???
The best example I can think of now is the Contacts app, how you drag your finger down the list of letters (on the right) and as you t...
I have narrowed down an ugly bug, but since it seems like something internal to the nib/Interface Builder, I'm at a loss of what to do next.
I've got a UIView created in IB which functions as a custom dialog box. It shows a message and two buttons. (Proceed or Cancel.) Both buttons have a Background image set in Interface Builder.
Some...
hey guys, this is my first time post here, and im pretty new to iphone programming. i just started about a month ago and have only been tinkering with small tutorial type applications but anyways, heres my question
i currently have a UIScrollView thats scrollable and zoomable, that loads a UIImageView subview, and i want to add in some ...
I've created a UIButton subclass so that I can stick a custom view into a standard toolbar button. All it does, is create a stretchable image for the background, and then adds a custom view with userInteractionEnabled set to NO so the button handles all clicks. The code is here:
- (id) init {
if (!(self = [super init])) {
...
I have a UITableView with two custom cells and each of them has a subview with a UITextField inside it. I have tried adding a UIButton on top of the UITableView and have it resignFirstResponder but that just means you won't be able to tap anywhere else - not even on the UITextFields to enter text.
How do I make it so if I tap outside th...
Hello all!
In my app, I have a table displaying a cell in each row.
In Interface Builder, I dragged a button onto the cell, styled it as a Dark Info button, and connected it to a IBAction.
That is working fine.
Only, I want the button to behave differently, depending on the row of the table where the cell of the button is.
How would I ge...
What I'm trying to do is replicate the NSTokenField like UITextField seen in the Mail app and Messages app (type a contact and it comes up with suggestions).
I've got the autocompleting working perfectly, when you type in a UITextField, a UITableView pops up showing any matches that it can find in an array, when you click one it adds it...
I have an image that is 480x331 and has a transparent background. The transparent part is just around the image's edges. My UIButton is 72x37. When I set the image as a background image in IB for the button, the transparent edges of the image show as white in the button. Without an image, the button is white with rounded corners. I'...
Hello,
I have several UIButtons that control the iPhone's music player.
I would like to have the music player seek backwards if the previous button is touched and held, but skip to the previous item if the button is single-tapped.
Currently, I am able to skip to the previous item with a tap, but touching and holding will seek backward...
I have a UIButton that is created inside of each table cell. I want to hook up a touch event like so:
[imageButton addTarget:self
action:@selector(startVote:)
forControlEvents:UIControlEventTouchUpInside];
I want to pass data about the current row (the id of the object for that row) to the startVote method. Is th...
Hi
Im extending the UIButton Class to be able to set the font and color of the UINavigationBarButton ( from this code example: switch on the code )
I goes like this:
@interface NavBarButtonGrey : UIButton
-(id)init;
@end
@implementation NavBarButtonGrey
-(id)init {
if(self = [super init]) {
self.frame = CGRectMake(0, 0, 49.0,...
I have an view in my App which has a number of buttons based on the number of items returned by the server. So if the server returns say 10 items, there should be 10 buttons and clicking on each button should call a different person.
For the above purpose I created a custom button class deriving from UIButton.
@implementation HopitalBu...
I have been trying to figure this out but have yet to come to a solid conclusion. I would like to create a UIButton and have it look like the buttons on the home screen, with the picture and text below it. I know Apple took away the UIGlassButton so the 3d'ish look can't be programmed but I am mainly wondering about the position of the e...
Hi,
I'm creating and adding an UIButton dynamically to UIView, like:
UIButton *btn = [UIButton buttonWithType:UIButtonTypeContactAdd];
btn.frame = CGRectMake(100, 10, btn.bounds.size.width, btn.bounds.size.height);
[btn addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
[myView addSubview:btn];
...
Hi,
I'm in a struggle. I have this app with two views. View1 empty. View2 with a textfield and an OK button. I want to accomplish the following:
On View2 the user inserts the name for a button; its title. (the way user reaches view2 is not relevant. It could be with a button or a tabbar button on View1.)
After pressing OK button, View...
I created a table view that is populated with a custom UITableViewCell (like this). Each of the cells contains two UIButtons. I assign the action to the button like this:
[decreaseButton addTarget:self action:@selector(decrease) forControlEvents:UIControlEventTouchUpInside];
Is this the right way?
Anyway, it works, but in my "decreas...
I have a scroll view that doesn't scroll right, I've simplified the code for below.
It draws the view and some horizontal buttons that i add more stuff to in the real code.
If you drag the whitespace between the buttons the view scrolls. If you happen to put your finger on a button, it won't scroll.
After a related suggestion, I tried...
I am using a UIButton in my application. This button title is displayed dynamically as per the user choice. Now i have to resize the button width as per the title content.
I am calculating the string length and assigning it to button's width.
the button is resized as per title but the problem is as follows,
1. If at first the title with...
Hi, i'm trying to load a simple uiview at the start with 2 buttons.
I would like to do the following:
-Press one of the buttons to go to a Tab bar view(and/or its controller)
-Press another one to go to a navigation view(and/or its controller)
-Also how to go back to the original view from those 2 views(tab bar and navigation)
I kno...