Search Results

Search found 295 results on 12 pages for 'uitextfield'.

Page 10/12 | < Previous Page | 6 7 8 9 10 11 12  | Next Page >

  • Determining credit/debit card type

    - by ct2k7
    Hi, I'm writing a POS application for the iPhone/iPod combination, using the same exact hardware used in Apple Stores:: EasyPay. Ok, my hurdle is this: how do I identify which credit card type is being used as text is entered in the uitextfield? I assume I've to use textField:shouldChangeCharactersInRange:replacementString:? However, I've got ideas floating around, but I simple cannot put them together to form code :/ Any help is appreciated! Thanks in advanced :D

    Read the article

  • FLEX: fade in/out, random positioning, text

    - by Patrick
    hi, I want to fade in / fade out some text placing it randomly on the screen in a flex module. I have 2 questions: 1) What Flex container should I use to display the actionscript text animations into it ? 2) What type should I use for text ? I need to set the textFormat on it. Is UITextField the correct solution ? thanks

    Read the article

  • How to scroll table view with toolbar at the top of the view

    - by Jakub
    Hello, I have a view with a toolbar at the top and a table view with text fields in it's cells. When I want to edit the text fields placed in the bottom of the table view the keyboard is hiding the text field being edited (as the table view is not scrolled up). I tried to implement http://cocoawithlove.com/2008/10/sliding-uitextfields-around-to-avoid.html but this makes my whole view move up (the toolbar and the table view) while I would like to have the toobar at the top of the view for the whole time. I modified the mentioned code to something like this: - (void)textFieldDidBeginEditing:(UITextField *)textField { CGRect textFieldRect = [tableView.window convertRect:textField.bounds fromView:textField]; CGRect viewRect = [tableView.window convertRect:tmpTableView.bounds fromView:tableView]; CGFloat midline = textFieldRect.origin.y + 0.5 * textFieldRect.size.height; CGFloat numerator = midline - viewRect.origin.y - MINIMUM_SCROLL_FRACTION * viewRect.size.height; CGFloat denominator = (MAXIMUM_SCROLL_FRACTION - MINIMUM_SCROLL_FRACTION) * viewRect.size.height; CGFloat heightFraction = numerator / denominator; if (heightFraction < 0.0) { heightFraction = 0.0; } else if (heightFraction > 1.0) { heightFraction = 1.0; } UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) { animatedDistance = floor(PORTRAIT_KEYBOARD_HEIGHT * heightFraction); } else { animatedDistance = floor(LANDSCAPE_KEYBOARD_HEIGHT * heightFraction); } CGRect viewFrame = tableView.frame; viewFrame.origin.y -= animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [tableView setFrame:viewFrame]; [UIView commitAnimations]; } and - (void)textFieldDidEndEditing:(UITextField *)textField { CGRect viewFrame = tableView.frame; viewFrame.origin.y += animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [tableView setFrame:viewFrame]; [UIView commitAnimations]; } This made my toolbar stay at the top, but unfortunately the table view overlays the toolbar and the toolbar is not visible. Any ideas how to solve this?

    Read the article

  • UINavigation Bar while moving view for writing in a textfield

    - by ObiWanKeNerd
    i'm using this code to move the view when i'm about to type on a textfield, otherwise the keyboard may cover the textfield if it's in the lower side of the screen. I would like to know if there is a way to maintain the UINavigation Bar in it's place, because with this code the bar will move with all the view outside the screen, becoming untouchable until i end editing the textfield (closing the keyboard). CGFloat animatedDistance; static const CGFloat KEYBOARD_ANIMATION_DURATION = 0.3; static const CGFloat MINIMUM_SCROLL_FRACTION = 0.2; static const CGFloat MAXIMUM_SCROLL_FRACTION = 0.8; static const CGFloat PORTRAIT_KEYBOARD_HEIGHT = 216; static const CGFloat LANDSCAPE_KEYBOARD_HEIGHT = 162; - (void)textFieldDidBeginEditing:(UITextField *)textField { CGRect textFieldRect = [self.view.window convertRect:textField.bounds fromView:textField]; CGRect viewRect = [self.view.window convertRect:self.view.bounds fromView:self.view]; CGFloat midline = textFieldRect.origin.y + 0.5 * textFieldRect.size.height; CGFloat numerator = midline - viewRect.origin.y - MINIMUM_SCROLL_FRACTION * viewRect.size.height; CGFloat denominator = (MAXIMUM_SCROLL_FRACTION - MINIMUM_SCROLL_FRACTION) * viewRect.size.height; CGFloat heightFraction = numerator / denominator; if (heightFraction < 0.0) { heightFraction = 0.0; } else if (heightFraction > 1.0) { heightFraction = 1.0; } UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) { animatedDistance = floor(PORTRAIT_KEYBOARD_HEIGHT * heightFraction); } else { animatedDistance = floor(LANDSCAPE_KEYBOARD_HEIGHT * heightFraction); } CGRect viewFrame = self.view.frame; viewFrame.origin.y -= animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [self.view setFrame:viewFrame]; [UIView commitAnimations]; } - (void)textFieldDidEndEditing:(UITextField *)textField { CGRect viewFrame = self.view.frame; viewFrame.origin.y += animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [self.view setFrame:viewFrame]; [UIView commitAnimations]; } Thanks in advance!

    Read the article

  • Resizing UIView to match its content

    - by Thody
    I have a UITextField, a UIButton, and a UIWebView nested in a UIView, which is nested in a UIScrollView. After the UIWebView has loaded its content, I need it to resize the UIWebView and UIView so that the UIScrollView will scroll. I currently have the UIScrollView getting its contentSize from the UIView, but I can't figure out how to do the resizing after the UIWebView's content has loaded.

    Read the article

  • masked the pasword input to UITexfield

    - by user262325
    Hello everyone I hope to mask the text input to UITextFiled as: "ABCDE" to "*****" below are my codes without function - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { int l=[textField.text length]; range=NSMakeRange(1, l ); string=[[[NSString alloc]initWithString:@"*"] autorelease]; return YES; } Welcome any comment Thanks interdev

    Read the article

  • Textview not able to move up when begin editing

    - by Jason lau
    I am having problem moving up my UITextview at the bottom. The UITextField is working properly but the UITextView is not working. Here is my code when press the TextView it pop up the toolbar. Please help - (IBAction)HideKeyboard:(id)sender { [self.myTextField resignFirstResponder]; [self.myTextView resignFirstResponder]; [self.myScrollView setContentOffset:CGPointZero animated:YES]; }

    Read the article

  • UITextFieldProblem

    - by sudhakarilla
    I have one issue with UITextField In my first view i have TextField and button.If i have TextField some insert value. i click that button it should open textfield value display Label in the second view. Please help in this issue.

    Read the article

  • inputAccessoryView not hide the view when -resignFirstResponder?

    - by Sam Jarman
    I have attached a toolbar with a UITextField and UIButton to the keyboard when it becomes the first responder via the user taping inside the textfield textField.inputAccessoryView = theToolbar; Problem is, the toolbar disappears when the keyboard is dismissed, thus preventing any further input. Any ideas on how to make the toolbar go back to the bottom of the screen rather than off it completely? I'm thinking a delegate method might help but Im really not too sure. It seems once the inputAccessoryView always the inputAccessoryView :( Cheers

    Read the article

  • How do I load a second view correctly in Swift?

    - by slooker
    I have a view that I'm trying to load in Swift like this, but it crashes with this error: 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "DetailView" nib but the view outlet was not set.' Here is the code I'm trying to use to load it. Second View Controller import UIKit class DetailViewController: UIViewController { @IBOutlet var nameField: UITextField override func viewDidLoad() { super.viewDidLoad() } } Code to load the view controller: var newViewController = DetailViewController() @IBAction func buttonTapped(AnyObject) { println("button tapped!") self.presentViewController(newViewController, animated: true, nil) } What am I doing wrong?

    Read the article

  • Store information on iphone device

    - by Siva
    Hi I am new to iphone development. In my app, i am using two UITextfield for that registering user ID and password. These user ID and password should be save on iphone device after entered text in textfield by the user. is there any idea to do that without database? otherwise how to do that?

    Read the article

  • How to handle touch events on UI Controls

    - by Sreelatha
    Hi, I have a query related to Touch events on the UI controls. I have 4 controls on the screen ( UITextField, UISlider, UISwitch, UIButton ). If the user touches any of the control on the screen, I want to fire touchesBegan and touchesEnded events on those controls in which I would implement some code. Please let me know how to fire these events. Thanks in advance, Sreelatha.

    Read the article

  • Runtime error on Did End On Exit in iPhone application

    - by Deepak Pillai
    Does anyone know why im getting runtime error when i click on return button on iphone keyboard. I need to hide keyboard after done editing values to UITextField. So i assigned Did End On Exit to IBAction and the IBAction code below -(IBAction)FinishEditing:(id)sender { [folderName resignFirstResponder]; } When running ma project i facing a runtime error and the variable values shown below argv char ** 0xbffff58c *argv char * 0xbffff6b8 **argv char '/' Console Value (lldb) Any idea to overcome this issue??

    Read the article

  • iPhone SDK: How to determine keyboard type within a UIKeyboardDidShowNotification?

    - by iPhone Developer
    Hello, I need to know the current keyboard type. I was setting an instance variable in - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField However, testing has shown that this is not always reliable because of the asynchronous nature of notifications. What I am wondering is if anyone can tell me how to determine the current keyboard type within a notification? - (void)keyboardDidShow:(NSNotification *) { // Need way to determine keyboard type here } Thanks.

    Read the article

  • UIView viewWithTag 0 problem

    - by leon
    Hi, On view in IB I have numerous items (including view itself). ONLY one item has tag 0, yet following line works for ANY UITextBox other then the one with tag 0. Note that only ONE UITextBox has tag 0, why: (UITextField *) [self.view viewWithTag:0]).text = @"foo"; Interesting that when triggered event received for the element with tag 0, I can get value of Tag 0 with no problem. Is there a limitation to look for tag 0 elements?

    Read the article

  • Is it a good programming practice to have a class with several .h files?

    - by Jim Thio
    I suppose the class have several different interfaces. Some it shows to some class, some it shows to other classes. Are there any good reason for that? One thing I can think of is with one .h per class, interface would either be public or private. What about if I want some interface to be available to some friends' class and some interface to be truly public? Sample: @interface listNewController:BadgerStandardViewViewController <UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,NSFetchedResultsControllerDelegate,UIScrollViewDelegate,UIGestureRecognizerDelegate> { } @property (nonatomic) IBOutlet NSFetchedResultsController *FetchController; @property (nonatomic) IBOutlet UITextField *searchBar1; @property (nonatomic) IBOutlet UITableView *tableViewA; + (listNewController *) singleton; //For Easier Access -(void)collapseAll; -(void)TitleViewClicked:(TitleView *) theTitleView; -(NSUInteger) countOfEachSection:(NSInteger)section; @end Many of those public properties and function are only ever called by just one other classes. I wonder why I need to make them available to many classes. It's in Objective-c by the way

    Read the article

  • Fix keyboard orientation in landscape iPad app (upside down keyboard)

    - by hjd
    I'm converting a landscape (UIInterfaceOrientationLandscapeRight) iPhone app to be a universal app. So far I've got the orientation working properly: the iPad version will launch with the right splash graphic and start in the right orientation (LandscapeLeft or LandscapeRight) depending on how the user is holding it. But: when I trigger the keyboard while the iPad is in LandscapeLeft, the keyboard appears upside down: I can't post images yet so you can see the error here: http://blog.durdle.com/images/ipad_keyboard.png That's a UIAlertView with a UITextField added to it. I guess the keyboard at this point is in the LandscapeRight orientation. If I rotate the device to LandscapeRight, the game view rotates to match the keyboard, then if I rotate the device back to LandscapeLeft the entire interface - game AND keyboard rotate together to appear correctly. So: how do I ensure it appears in the correct orientation?

    Read the article

  • iPad popover textfield - resignFirstResponder doesn't dismiss keyboard

    - by mosdev
    I have two text fields email and password. The following code works fine when the fields are presented on a regular view but when they are on a popover, the resignFirstResponder does not work (becomeFirstResponder works). textFieldsShouldReturn was called for both fields. Any idea if I am missing something? Thanks! - (BOOL)textFieldShouldReturn:(UITextField *)theTextField { if (theTextField == email) { [password becomeFirstResponder]; return NO; } [theTextField resignFirstResponder]; return NO; }

    Read the article

< Previous Page | 6 7 8 9 10 11 12  | Next Page >