Posts

Showing posts with the label uikit

How to disable isEnable and isUserInteraction attributes but keep cursor show in UITextField?

Image
Clash Royale CLAN TAG #URR8PPP How to disable isEnable and isUserInteraction attributes but keep cursor show in UITextField? I have a custom framework for UITextField . For now, I want to disable two attribute as the question above but still keep the cursor show in my custom textfield. I already disable the keyboard with set the inputView = UIView() , and that successful for hide the keyboard even show the cursor inside textField. UITextField inputView = UIView() My goal is disable both attributes like above or another for can not Select All action from my textField, but still keep the cursor available anytime. Select All Hope to hear the ideas from you guys. Thank a lot! Put a dummy view above textview with clear color, and show and hide that view. – Bista 31 secs ago By ...

Swift Custom NavBar Back Button Image and Text

Image
Clash Royale CLAN TAG #URR8PPP Swift Custom NavBar Back Button Image and Text I need to customise the look of a back button in a Swift project. Here's what I have: Here's what I want: I've tried creating my own UIBarButtonItem but I can't figure out how to get the image to be beside the text, rather than as a background or a replacement for the text. let backButton = UIBarButtonItem(title: "Custom", style: .Plain, target: self, action: nil ) //backButton.image = UIImage(named: "imageName") //Replaces title backButton.setBackgroundImage(UIImage(named: "imageName"), forState: .Normal, barMetrics: .Default) // Stretches image navigationItem.setLeftBarButtonItem(backButton, animated: false) @Randy You mean make a UIView and add a Label and ImageView and set that? – Conor May 31 '16 at 18:25 ...