I have used a Text view in my app for iPad on xib. I wrote some text on it. Now while the app is running and the user is reading that text, if he accidentally touches the screen a keyboard appear. I want to disable that keyboard popping out. How should I do it?
Try setting the editable mode off:
textView.editable = NO;
You can also achieve this via Interface Builder by unchecking the Behavior Editable box in the Attributes Inspector tab.
Related
I want to add my customView on click of button which contain images similar to smiley(default button)while editing textField or textView using keyboard.
Thanks in advance.
You can't change default keyboard of Apple. But you can use inputAccessoryView of the text field, add a UIToolbar to it, and in the toolbar you can add a few buttons you want
or otherwise you create custom keyboard and then use it.
How do I replicate the appearance of the button bar in the Mail App? I'm pretty close, but I cannot seem to get the colors to work the way I want.
If I set the background color for the view containing the buttons, it won't look the same as the NSTableView above it when the window loses focus.
Here is my app with focus:
My app without focus:
Mail.app with focus:
Mail.app without focus:
So in short, I want the same behaviour as the mail button bar with or without focus. How would one do that?
After spending a lot of time on this and then after finally asks a question here, I manage to fix it.
What I did was adding a bottom bar in IB and then programmatically setting the same color on the bottom bar as the background color on the NSTableView.
I'm making an cocoa application from Mac OS X, not for iphone.
I am able to set the background image of a button and uncheck bordered in the attribute inspector. However, I do not know how I set the image for when you click on it (highlighted/on click, whatever you want to call it). I want to do this because
I have found guides on google to do this with UIbutton but this isn't helpful since I'm making this for Mac.
I am using InAppStoreWindow and the button is in the Title bar. When I click on the button with the custom image, the background goes white:
Thank you very much!
You are getting white background when button is clicked because You're using incorrect type. You need to change button's type to Momentary Change. You can change it in Attributes inspector:
Or change programatically:
[buttonOutlet setButtonType:NSMomentaryChangeButton];
And for highlighting: just add another image as alternate image in Attributes Inspector and it will be shown when button pressed.
I am trying to write an app that uses a custom keyboard. How can I write code that prevents the iPhone keyboard from popping up. I have seen a custom keyboard that enters text in other iPhone applications, so I know that it is possible.
You're looking for the inputView property that's present on every view (inherited from UIResponder).
I'm working with Xcode doing a Ipad app.
i simply want user to click anywhere on screen (not counting text fields) to perform some IBAction.I'm using an invisible button that covers my whole view.
Since I have some text fields in my view,i need to add this invisible button to the background of my user interface. I cant seem to find this option in the button attributes? any help?
Just set the button's type to custom.
Did you try setting the opacity of the button to zero?
I guess i got your point. You just want to put the UIButton(invisible) on the back of all the UITextField. The simple solution to this is open the Document Window in the IB. Now expand the view tree in the list view. Just drag your UIButton above the UITextFields and set the alpha value for the button in the property to be zero.
Hope this helps!!
iPad users don't "click". They "tap" or "touch".
In Interface Builder, I believe views are constructed with a z-index from top to bottom as they appear in the document window, so dragging your button so that it appears as the first subview of your main view should be a quick fix for this.
Have you considered other approaches? This doesn't sound like standard behaviour for an app and will probably cause havoc with anybody using Voice Over. What are you trying to accomplish?