Search Results

Search found 447 results on 18 pages for 'uibutton'.

Page 9/18 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to make a blue button with white text?

    - by Bonnie
    // Make text white... and background blue [myButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [myButton setBackgroundColor:[UIColor blueColor]]; Should that make a button with white text... and a blue background? It doesn't.

    Read the article

  • UIButton and UIControlEventState issue

    - by Typeoneerror
    I'm having a very specific "bug" in my iPhone application. I'm setting two images for the highlighted and normal states of a button. It works as expected when you "press" and then "touch up" at a slow pace, but if you click/tap it quickly, there's a noticeable flicker between states. Is this a known bug or am I setting the states incorrectly? Here's the code that creates the buttons: UIImage *normalImage = [[UIImage imageNamed:@"btn-small.png"] stretchableImageWithLeftCapWidth:10.0f topCapHeight:0.0f]; UIImage *highlightedImage = [[UIImage imageNamed:@"btn-small-down.png"] stretchableImageWithLeftCapWidth:10.0f topCapHeight:0.0f]; [self setBackgroundColor:[UIColor clearColor]]; [self setBackgroundImage:normalImage forState:UIControlStateNormal]; [self setBackgroundImage:highlightedImage forState:UIControlStateDisabled]; [self setBackgroundImage:highlightedImage forState:UIControlStateHighlighted]; [self setAdjustsImageWhenDisabled:FALSE]; [self setAdjustsImageWhenHighlighted:FALSE]; When a button is tapped it simply disables itself and enables the other button: - (IBAction)aboutButtonTouched:(id)sender { aboutButton.enabled = FALSE; rulesButton.enabled = TRUE; } - (IBAction)rulesButtonTouched:(id)sender { rulesButton.enabled = FALSE; aboutButton.enabled = TRUE; } Any thoughts on this quick-click flicker?

    Read the article

  • iPhone: How to Display Underlined Text in a Button?

    - by Warrior
    I want to display the mail ID in my view such that clicking the mail ID should open the mail composer view. I want to display the button text as underlined to show it is a hyperlink and for the button click event to call the mail composer view. At present, I am not able to show the button text underlined. I thought of placing a label above the button and adjusting the label property to get the underlined text but that did not work. Is there a different way to get the appearance and behavior I want?

    Read the article

  • UITextfield is becoming focused after UIButton pressed

    - by Chris
    I have a UITextfield for entering text. A button triggers a functionality. After completion of the IBAction the UITextfield is getting focused again. After the IBAction I want to keyboard to disappear. What happends now is that due to the IBAction of the button, the keyboards disappears (I'm showing a UIAlert) and after the IBAction the keyboards pop's up again together with the focus in the UITextfield. Is it possible to prevent the UITextfield to be focused after the IBAction?

    Read the article

  • Change the state of a customized button (button with an image)?

    - by Harry Pham
    I know how to change the state of the regular button, as well as change the background color of a regular button. However, what I have is a image lay on top of a button (customized button). I want, when the user click on it, something visually would happen to let the user know that button is selected, and when the user click again it go back to the regular state. I try to change the background of the button, but it doesnt work since the image kind of cover the button. Any idea?

    Read the article

  • UIButtons creating a native-like keyboard behavior.

    - by camilo
    Greets. A somehow detailed explanation on my problem, and what I have already done, and what I cannot do. I want to create a behavior resembling the one in the iPhone's keyboard. Basically, I want a view to appear when the user taps a button and WHILE the user taps that button. This, I accomplished. When the user lets go of the button WHILE his finger is on that button's area, I want to trigger an action "doing stuff". This, I was also able to do. Since all the buttons are near (like in the keyboard) and I don't want the user to select other button than the one he pressed, I reduced the hit area for the button using the -(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent )event function. When the user presses the button, not lifting its finger, and dragging outside the button area, I want another action to trigger. This is the first problem... This function only triggers when the user's finger is far from the buttons' area, and this time the pointInside function is not being my friend. How can I detect the user finger "left" the button area the moment it exits its bounds? This, in case you didn't realize... was problem 1. The second problem is related with the drag enter. Again, I need to limit the area like in the drag exit. But I suppose that when I solve one of these, the other is the same. The problem is that in order to have a behavior like in the keyboard, I may need to detect the user started the touch in another button, never lifted his finger, and changed to another button. I can detect drag enter and drag exit IN THIS ORDER while on the same button. I cannot detect drag enter when the user first touched anywhere else other than the button where I want to detect the drag enter event. Basically what I need is to detect touch on any button (and not anywhere else in the view), and while the user is changing buttons without lifting the finger, I want to detect the new button being touched. This gigantic paragraph was problem #2. Any help, as you might guess, is highly appreciated. Best Regards. Thanks a lot!

    Read the article

  • iphone tabbar with custom buttons and scrollvie

    - by chunjai
    i'm trying to get a tab bar effect not unlike russel quinn's 'creative review' app. the tabbar swipes across, which i have figured out, but the tabbar style itself is unlike anything i've seen on the iphone (though it looks so simple!). it has square buttons with a space between, and each button has a select/active/inactive state. i'm having a hard time seeing how this can be tabbar, but i don't know any other way. can someone explain this? here's the example :: http://bit.ly/c8CeBC. any help is appreciated.

    Read the article

  • iphone instance / class method issue

    - by user290031
    Hey All, Okay, so I have a viewController method that has some elements created with interface builder and some I coded myself. I created a view in the IB...lets call it viewOne. I created a loop that creates buttons (through code) and places them on a separate view (viewTwo). This is done in a class method. However, I want the view I made to be opened everytime one of the buttons is clicked. So I did: [button addTarget:self action:@selector(woogoo:) forControlEvents:UIControlEventTouchUpInside]; The woogoo class does the following: +(void) woogoo:(id)sender { //back button [self.view addSubview:viewOne] } However, the program crashes when a button is clicked. I did try making woogoo an instance method but it also crashes in this case too. All I want to do is show viewOne when a button is clicked. Any ideas what I can do?

    Read the article

  • How can we disable the button in my iphone app?

    - by wolverine
    In my application, there is one button in the navigation bar. I want it to work only for the 1t click of the user. If he continousally presses on it 2 or 3 times just after the 1st click the button shouldnt recieve the following ones. How can I do this? My app always crashes if the user presses it for more than once. I dont want to make it multithread and use lock. Thats why i want to know whether there is anyother alternative.

    Read the article

  • Create an UIButton with "push button" appearance?

    - by Krumelur
    I want to create a button with the same look and feel as the "Timer" function in the builtin Clock app, but it really eludes me how to do it. By looking at the source code for UICatalog, it seems to create these buttons you need to create a custom bitmap. Is this true? If so, is there a "standard" bitmap that can be used, to ensure consistent user experience?

    Read the article

  • iPhone stretchableImageWithLeftCapWidth only makes "D"s.

    - by Jill
    UIImage *aImage = [[UIImage imageNamed:@"Gray_Button.png"] stretchableImageWithLeftCapWidth:25 topCapHeight:0]; Trying to make a "glass pill button". What does "stretch" do if the image is bigger... and the button I'm trying to use it on... is smaller? Does the image 'stretch' and 'shrink'? The reason I ask... is because all my images end up look like a "D" shape. The left side is squared-off... and the right side is rounded. What would a D-shape tell you that I'm doing wrong? Too much.. or too little... "leftCap setting"? Too large an image?

    Read the article

  • Unable to pass variables from one view to another

    - by jerincbus
    I have a detail view that includes three UIButtons, each of which pushes a different view on to the stack. One of the buttons is connected to a MKMapView. When that button is pushed I need to send the latitude and longitude variables from the detail view to the map view. I'm trying to add the string declaration in the IBAction: - (IBAction)goToMapView { MapViewController *mapController = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil]; mapController.address = self.address; mapController.Title = self.Title; mapController.lat = self.lat; mapController.lng = self.lng; //Push the new view on the stack [[self navigationController] pushViewController:mapController animated:YES]; [mapController release]; mapController = nil; } But I get this when I try to build: 'error: incompatible types in assignment' for both lat and lng variables. So my questions are am I going about passing the variables from one view to another the right way? And does the MKMapView accept latitude and longitude as a string or a number?

    Read the article

  • how to add Done Button to dismiss the Number Pad

    - by mac
    I followed the tutorial http://www.neoos.ch/news/46-development/54-uikeyboardtypenumberpad-and-the-missing-return-key to dismiss the number pad, this tutorial add the button as sub view to the number pad, my problem is, in the same view i am using the text field to enter text also,so, how to differentiate the number field, and text field. so that i can hide the button view accordingly. thanks in advance.

    Read the article

  • Strange Bug in iPhone SDK

    - by Crazer
    Hi all, I found a strange bug in iphone sdk. I try to explain it: I have a number of uibuttons in a view. They are all just images. Every buttons has a title but that is not displayed so you just see the images (all 80x80). I made it all in IB. In my code I position those buttons. Here's a snippet of that code: for(NSString *iconObject in iconArray){ //retrieve UIButtons from dictionary iconButton = [allIconsDictionary objectForKey:iconObject]; iconButton.hidden = NO; //position and resize icon Buttons iconButton.frame = CGRectMake((79 * col) + 28, (70 * row) + 70, 80 ,80); col++; //five buttons in a row if(col%5 == 0){ row++; col = 0; } } That works like it should. But for all buttons that title starts with a 't' the title displays in the simulator (also on the device). The title of the other buttons are not shown just those where the title starts with a 't'. I have no clue what this could be?! I hope I could describe the problem.

    Read the article

  • Adding buttons dynamically to a uitableviewcell - iPhone app

    - by alan
    I have a verb conjugation app that displays verb translations in the first cell of a table. At present the translation list is just a string (comma-separated list) but I'd like to change it to have clickable buttons. I had a play around adding buttons to the cell view without too much success but my only experience with custom cells has been using specific positioning so I'm unsure as to how to achieve a dynamic list of buttons (varying widths) within a cell. Any help greatly appreciated. Cheers.

    Read the article

  • multiple action buttons one view on iphone

    - by alecnash
    I am trying to create a map app for iphone and I have a little problem. Every pin on the map has a different name. How can my program know which pin button is pushed so it can get the data from the server. I've created only one detailed view and I don't know how to make this work.

    Read the article

  • Best way to handle enable/disable of UIButtons on iPhone

    - by Anonymous
    I have an increase button and a decrease button, both of which affect a variable. The variable has a minimum and the decrease button will be disabled once that minimum is reached. Likewise for the maximum value of the variable. In my controller, I have two IBActions for both the increase and decrease actions, and two IBOutlets, in order to disable the buttons accordingly. At the bottom of my KVO statement to handle the value change, I have: increaseButton.enabled = value != MAX; decreaseButton.enabled = value != MIN; While this code is functional, I can't help but feel that feel this is a naive approach to the problem, especially since this requires 4 connections. Is there a better solution to this, one that uses fewer connections?

    Read the article

  • JQuery Buttonset - Add button

    - by leaf dev
    I am looking for a way to add a button to a JQuery buttonset at runtime with javascript. if(response.success) { var menuItem = document.createElement('a'); $(menuItem).attr('href', response.href); $(menuItem).attr('category-id', response.id); $(menuItem).text(title); $("#menu-buttonset").append(menuItem); } I am adding the hyperlink to the div container of the buttonset using javascript, and then re-calling buttonset() on the container. $("#menu-buttonset").buttonset(); This however does not seem to rebuild the buttonset as I expected. I am not seeing any function in the JQuery API for this either. Can anyone provide some insight?

    Read the article

  • Click event of a button which is subview of an image view in xcode

    - by Christina
    in my app i have an image view and above that i added an button.And also in button click event i am calling a method.But i am unable to click on the button .whenever i try to click the button then the row of the table vie win which my image view is present is selected .Is there any method from which i can get the click event of the button which is placed on the image view.I do not want to use UIbuttons for setting the images in place of image view .Also if i am adding button as a subview of the table view then the click event is working but when i change the subview to image view then i get unsatisfactory result.Please help. Thanks, Christy

    Read the article

  • Button in App on iOS 4.2 won't work properly

    - by MatthiasC
    My app, written for the iPad contains several UIButtons. One of them starts and stops an AVAudioPlayer: hitting the button once starts the player, hitting it again stops it accordingly. Rinse and repeat. This all works nicely on iOS version pre 4.2. When installing the App on an iPad with iOS 4.2, the button turns on and off the audio player exactly once, then stops working properly: after hitting the button, it turns into its selected state, but it does not start the audio player (as it should) and hitting the button again doesn't return it to its default state, either. As previously said: it's all fine and dandy pre 4.2, the problem only arises on the most current OS version. XCode 3.2.4 iPad with iOS 4.2

    Read the article

  • How do I create a gradient button on an iPhone?

    - by jkp
    How can I create a button that looks like the one found in the screenshot below on an iPhone with the 3.0 SDK? It's a button that shows when connecting to a host iTunes library from the iTunes remote. Is it a case of writing a custom control or is this a stock style?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >