UIMenuController with Images [duplicate] - iphone

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

which multi-selection can be implemented in iphone (Registration page)

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.

Can UIMenuItem show UIImage?

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!

UITextView Puzzle?

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.

how to do localization for iphone

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.

IOS 4.0 is it a way to add hipperlink kind of interaction to some range of NSMutableAttributetString?

hi i'm building app with some rich text content on it and text content i have with NSMutableAttributedString. I cought links in my text with regex and made it blue but don't see the way to add some interaction to string ranges of NSAttributedString. is it any way? is there a way to do so?
thank you
here is answer for my own question. I'm new to apple development so this project might be really dirty but it works for me, if anybody wants to improve it or has any suggestions please let me know, lets make this text project better ;) textViewProject