Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

swift 5 on return button action

Swift 5:
class YourClass: UIViewController, UITextFieldDelegate {
  
  	// will trigger when return button from keyboard is pressed
    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        performAction(textField)
        return true
    }
  
  	private func preformAction(_ textField:UITextField){
    	//... code here ...
    }
}
Comment

PREVIOUS NEXT
Code Example
Swift :: Swift Access Control 
Swift :: dynamic table view height without scrolling 
Swift :: Swift Literals 
Swift :: swift get all cases starting with 
Swift :: octobercms add extra slash to css url 
Swift :: Strong Reference in Swift 
Swift :: spilit string in swift 
Swift :: ios network request 
Swift :: detect textfield change swiftui 
Swift :: how to add two right bar button item xcode 
Ruby :: button with icon rails 
Ruby :: ruby lowercase 
Ruby :: ruby remove unsafe file characters 
Ruby :: remove ruby 
Ruby :: rails migration rename column 
Ruby :: rails video_tag with <source 
Ruby :: contains ruby array 
Ruby :: rails change date format 
Ruby :: edit file terminal mac 
Ruby :: ruby string to symbol 
Ruby :: default value rails migration 
Ruby :: date class to unix timestamp ruby 
Ruby :: link to do rails 
Ruby :: Ruby instance variabnl get 
Ruby :: ActionController::InvalidAuthenticityToken rails when submitting form 
Ruby :: active admin with friendly_id 
Ruby :: manage ruby versions 
Ruby :: rails form validation custom message 
Ruby :: insert element in the middle of an array ruby 
Ruby :: ruby heredoc 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =