can I put a scrollable text field on a uialertview? - iphone

I am needing to alert something for an answer for a trivia game iOS app I am writing. I have an alert view that pops up and shows a scrollable uitextview...is Apple going to ding me for that? What are my options for showing large amounts of text in my alert?
Thanks!!

I think that showing UITextView is ok. Moreover it seems that Apple actually does the same thing - if you try to display very long text in UIAlertView then it will be displayed in scrollable UITextView automatically
P.S. and it also uses UITableView instead of buttons if you set too many button names.

Related

UIAlertView - accessing subviews, scrolling

I am implementing something like Eula in my iPhone app. I need to enable the confirm button only when user reads whole Eula (scrolls along whole long text).
I am using UIAlertView, with long inside text. Thanks to this, the text field inside alert view have a scroll bar on its right side.
I need to access the delegate of this scroll, because I need to enable OK button only if user scrolls down with scrollable text.
If you are planning to release this app on the AppStore, you can't do it using the builtin UIAlertView.
UIAlertView doesn't have any method, and it's delegate protocol doesn't give you this kind of information.
Probably you can achieve this iterating through the subviews of the UIAlertView instance, but doing this will guarantee your app the rejection :-)
the only thing you can do is to create your own "MYAlertView" component

UIMenuController not showing UIPasteBoard is cleared iPhone app?

Am working in message based iPhone application. In my application looking like iMessage native iOS app. I made Bubbles with used UIImageView and UILabel. I made UILabel as clickable and showing Copy option. It is working fine when the message input UITextView is not in active.
1. I can show the "Copy" option when we clicking UILabel and the UITextView is not becomeFirstResponder.
2. When the user clicking the MessageTextView (UITextView) from the bottom of the screen the UITextView becoming first responder and keyboard is showing now. In this scenario if the user clicking the messabe bubble (UILabel) the UIMenuItem showing "Paste" on the bubble instead of "Copy".
3. If i click "Paste" from the bubble UIMenuItem already copied text will be pasting in UITextView. So the control fully in UITextView UIMenuController not activated in UILabel. So i cleared the text from UIPateBoard when the user clicking the Bubble (UILabel).
4. Now the UIMenuController not showing up even [self becomeFirstResponder]; not becoming in UILabel class.
The reason is when the UITextView is in becomeFirstResponder the control fully in that. not coming to UILabel. Could you please help me on this.
How to show UIMenuItem "Copy" when the user clicking UILabel if the keyboard is in visible the control is in UITextView? Could you please help me on this. I spent two days in this issue. Thanks in advance.
May be I am wrong.CONSIDER THIS ANSWER AS A COMMENT.
I tried to achieve like what you are trying to do. Thats not working too. I figured out I cannot make access the two views at the same time. Especially when I have any view becomeFirstResponder and you cannot access menu items of other view.
But if you try like this,you may succeed in your code.
1) In the touchesBegan: method, find the user touching inside your UILabel.
2) If that happens, then show a custom view with buttons like copy,paste and select like that.

Displaying a popover on a text tap

I'm working to try and create a kind of wiki-esque app, in that when you click on a piece of text displayed in a UITextView, the app displays a popover with the word's definition. I've been searching around and the best idea I have is just tracking the location on the screen of all of the text that can have a popover and then tracking where exactly finger taps occur and displaying a popover when they coincide. Are there any better solutions to this?
Thanks,
Pete
The easiest way that I've figured out to do this is to go line by line and essentially paste a UIButton with the same text as the link over the original text. This means that I had to use UILabels for every line and then add them to an entire view. You get the same effect as a UITextView, but you can pinpoint the CGPoint where the text appears in a line.
Kind of hacky, but it was the best solution I could find!

support for uialertview with text field

Does anyone know whats the solution for pre iOS5 if I want to show a pop UIAlertView with a text field? A solution that would be acceptable by Apple?
Thanks.
Sure, I have a pre-iOS5 app in the App Store with such a text field.
Just add the text view as a subview to the alert view and figure out the spacing by inserting an appropriate amount of \n into the message to make room for the field.

Problem with UIScrollView and keyboard in iPhone

Let's see: i have to views each with a couple of textfields.
One was built regularly, the other one has more textfieds and components so i added a scroll, which works (sorta). The problem is that, now, when i touch one of the text fields the keyboard appears and it hides the components, it doesn't scroll "naturaly" like in the regular view with no scroll (there, you know, the keyboard appears and the view "moves" in order to show the active text field).
So how can i accomplish that from my scroll?
I hope i've been clear, i'm an iOS newbie.
Your answer should be found here.
How to make a UITextField move up when keyboard is present?