Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

Button on right side/view of UITextField

let button = UIButton(type: .custom)
button.setImage(UIImage(named: "send.png"), for: .normal)
button.imageEdgeInsets = UIEdgeInsetsMake(0, -16, 0, 0)
button.frame = CGRect(x: CGFloat(txt.frame.size.width - 25), y: CGFloat(5), width: CGFloat(25), height: CGFloat(25))
button.addTarget(self, action: #selector(self.refresh), for: .touchUpInside)
textField.rightView = button
textField.rightViewMode = .always
Comment

PREVIOUS NEXT
Code Example
Swift :: enums With Raw Values Swift 
Swift :: Swift Dictionary Inside a Tuple 
Swift :: swift core data order by 
Swift :: xcode create image from calayer 
Swift :: swift converting time string to number 
Swift :: swift check if class is of type 
Swift :: Swift break and continue Inside Nested Loop 
Swift :: Swift while Loop to Display Game Level 
Swift :: SwifUI call the function in the cordinator 
Swift :: Allow user to import image 
Swift :: how to stack align label over a card in flutter 
Swift :: Swift Variables names must start with either a letter 
Swift :: Swift mutating Methods 
Swift :: no module like realmswift 
Swift :: Swift Code Blocks 
Swift :: swift class init 
Swift :: UICollectionviewcontroller reload data 
Ruby :: ruby struct 
Ruby :: ruby get current datetime 
Ruby :: eager load polymorphic rails 
Ruby :: rails migration polymorphic references 
Ruby :: ruby capitalize first character of sentence 
Ruby :: ruby deep merge 
Ruby :: ruby raise argumenterror 
Ruby :: concatenate arrays in ruby 
Ruby :: ruby change directory 
Ruby :: text_field_tag rails 
Ruby :: remove ascii characters from string ruby 
Ruby :: ruby hello world 
Ruby :: CSV total rows ruby 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =