uitextfield

Scrollview of UiTableview with multiple textfield shows copy value from one to another

泄露秘密 提交于 2019-12-11 18:11:09
问题 I am facing issue with dynamic cell which create multiple Textfield based on selection of my medicationTime .when i entered select medicationTime based on that my textfields are created and if i deselect medicationTime ,textfield should get removed from uiTableview cell which is working fine.Problem i am facing while scrolling my tableview as 1st textfield value get copied to 5 th textfield and vice versa. Also while deleting textfiled the values get copying UITableViewDelegate

Set custom UITextField max length

╄→гoц情女王★ 提交于 2019-12-11 17:59:38
问题 I can't find a solution on my problem because all other posts at stackOverflow refer to UITextField created with the IDE and not programmatically. I have a custom UITextField created inside (void)viewDidLoad .I have this created programmatically so i can access the leftView property. UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 66, screenAdj, 30)]; textField.borderStyle = UITextBorderStyleRoundedRect; textField.font=[UIFont fontWithName:@"Helvetica" size:14];

Moving UITextField up with keyboard - changes in swift 4.2?

自古美人都是妖i 提交于 2019-12-11 17:49:47
问题 I had this function to move certain textfields upwards, when the keyboards would block their view - I'm sure you all know about this: override func viewDidLoad() { super.viewDidLoad() let center: NotificationCenter = NotificationCenter.default center.addObserver(self, selector: #selector(keyboardDidShow(notification:)), name: NSNotification.Name?.UIKeyboardDidShow, object: nil) center.addObserver(self, selector: #selector(keyboardWillHide(notification:)), name: NSNotification.Name?

How do I get around my UITextField's HUGE auto-correct dismissal area?

拜拜、爱过 提交于 2019-12-11 17:45:04
问题 In my UITableView, each row has a text field or switch as its accessory view (a bit like the Settings app). The textFields are set with Auto-capitalisation ON. But the auto-correct prompt (the one you tap to dismiss the suggestion) seems to react to finger presses up to 65 px below the actual textField! This means, for example, if a user types something in a textField, and then tries to press a UISwitch in the row below (without pressing return), instead of pressing the switch, their first

UITextField not editable and not showing keyboard

情到浓时终转凉″ 提交于 2019-12-11 17:12:48
问题 I am using a table view controller to display content. I am trying to make an editable UITextField, but it is not editable. I can get them to display in each cell, but when I tap on them they aren't editable. I am also trying to store what the user enters in each cell. Please ignore the commented out parts. Here is my code: override func numberOfSections(in tableView: UITableView) -> Int { return 1 } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

How to trigger an event when text is highlighted in swift

不羁的心 提交于 2019-12-11 16:59:30
问题 I want to make a book app in which the users will read the chapters in it. I want to add a feature in which the user can highlight text and keep it in the app for future reference. How can I trigger an event (like a button with an icon to highlight) after selecting text in swift? Please help I have googled this for hours and nothing // // ViewController.swift // platesofned // // Created by Mauricio Kiyama on 5/13/19. // Copyright © 2019 Mauricio Kiyama. All rights reserved. // import UIKit

Having trouble using NSNumberFormatter for currency conversion in iOS

好久不见. 提交于 2019-12-11 16:36:59
问题 I have a UITextField that receives numeric input from the user in my application. The values from this textfield then get converted into currency format using NSNumberFormatter within my shouldChangeCharactersInRange delegate method. When I enter the number "12345678", the number gets correctly converted to $123456.78 (the numbers are entered one digit at a time, and up to this point, everything works smoothly). However, when I enter another digit after this (e.g. 9), rather than displaying

I am not able to get text field value in to next tab viewController. I am using TabBarController with two tabs

时间秒杀一切 提交于 2019-12-11 16:13:25
问题 I have a TabBarController with two tabs; first is InputViewController and second one is TableviewController . Input view controller has two text fields when I enter the text, after that I want to receive that text filed value in to TableviewController (in the next tab). It does not receive the value. 回答1: Try to use this concept..... Declare two variables in Second tab that is Tableviewcotroller.. For exa.. NSString *strname; NSString *straddr; @property and @synthesize both... Now, in your *

UITextField is partially hidden by Keyboard when opened

好久不见. 提交于 2019-12-11 16:09:21
问题 I am attempting to create a collection of UITextField elements. I'd like the next button on the keyboard to skip to the next field and if that field is hidden from view by the keyboard, scroll it into view. This is my attempt. It works apart from 1 aspect. When dismissing the keyboard and then selecting another (or the same) field, the text input is partially hidden by the keyboard (see attached gif). The meat and potatoes is within the ViewController extension. class ViewController:

Delegate text from TextField between Container Views

别说谁变了你拦得住时间么 提交于 2019-12-11 16:04:25
问题 I'm trying to pass text form one TextField to another TextField. Both of them are located in different ContainerViews. Users can switch between different ContainerViews by Segmented Control (thus, all my ContainerView are located inside of the ViewController with Segmented Control). I tried to do this with delegation: whenever text in TextFieldOne change, this changing should affect on another textField, so, I tried to use action on TextField in first container with Event "Value Changed":