I saw that it's possible — iBooks application does it.
Is it any way to do it?
I wrote a category to support image for UIMenuItem. It's based on method swizzling, but should be safe in most cases.
https://github.com/cxa/UIMenuItem-CXAImageSupport
There is nothing in the current official API do that. UIMenuItem can only be initialised with -initWithTitle:action:
I suspect that Apple either using a private API or have implemented a custom control. Probably the former.
Asked previously here
Check Emoji & Symbols, perhaps it will fit to your purpose.
Go to your Xcode Menu -> Edit -> Emoji & Symbols.
Ex.:
let menuItemYes = UIMenuItem(title: "✅", action: "doSomething")
Good luck!
Related
I saw that it's possible — iBooks application does it.
Is it any way to do it?
I wrote a category to support image for UIMenuItem. It's based on method swizzling, but should be safe in most cases.
https://github.com/cxa/UIMenuItem-CXAImageSupport
There is nothing in the current official API do that. UIMenuItem can only be initialised with -initWithTitle:action:
I suspect that Apple either using a private API or have implemented a custom control. Probably the former.
Asked previously here
Check Emoji & Symbols, perhaps it will fit to your purpose.
Go to your Xcode Menu -> Edit -> Emoji & Symbols.
Ex.:
let menuItemYes = UIMenuItem(title: "✅", action: "doSomething")
Good luck!
I have multi-selection dialog(drop-down) in Android where user selects all options applicable to him in registration page.What can be used in Iphone for the same purpose ?
And selecting a few options will unhide few textfields which is mandatory to fill.
Let me know what can be my approach.Please share any open source code links.
Thanks in advance.
No, there is no such thing within the iOS SDK and that is for a good reason - those elements are just not pretty, funky and usable well enough when acting on a touch display.
Consider using UIPickerView or UISegmentedControl instead. Maybe also have a look at Action Sheet.
Is there a way to add a custom image to the UIMenuItem in iOS? It have to look like in Android (Image + Text below). May be there are completed custom controllers? Thx in advance.
Yes you can but in a special way — using method swizzling but no any private API. Checkout my project https://github.com/cxa/UIMenuItem-CXAImageSupport for details.
In one project XCode4 intellisence feature shows setContentToHTMLString method of UITextView but in other project intellisence feature not showing setContentToHTMLString this method of UITextView.
I want to use setContentToHTMLString method of UITextView for HTML-based Presentation-only in my textView this works in one Project but not showing even by the intellisence feature of UITextView.
Any Suggestion.
Thanks in Advance....
I don't know why Xcode has this changing behavior, but I would suggest you not to use that method, because it is in a private API, so your app would be rejected by Apple. Possibly the fact that it is private is also why sometimes it is showing (it should not), others it is not.
The way to go to display HTML content is either use a [UIWebView][2], with all its caveats, or try out Three20 styled text facilities, which are quite limited, though.
i got button....
displays on button
Search...
when i selected localization.....
i need to display
Zoeken
for search button its displays Zoeken...
#All thanks in advance.
You should look at NSLocalizedStringWithDefaultValue:
NSString *buttonTitle = NSLocalizedStringWithDefaultValue(#"KEY", nil, [NSBundle mainBundle], #"VISIBLE_DESCRIPTION", #"DEVELOPER_DESCRIPTION");
[aButton setTitle:buttonTitle forState:UIControlState...];
You'll then need to provide the relevant localization files in your project for the languages you intended on targeting.
As a top level skim, you can create per-locale NIB and string resource files using the built-in internationalisation capabilites.
However, this is quite a broad topic (there's an entire section of the Apple developer site dedicated entirely to internationalisation, complete with sample code, etc.), so what you need to do it read the documents there, look at the sample code and then ask a more targeted question if you get stuck/have a specific issue.