how to disable user interaction of only main view with out subview - iphone

I did a simple view based application.
I need to place three textfields in an alert view.
it is not possible According to UI guidelines.
So that i crate a view just like an alert view,And place text field in them.
Add it as subview to mainview while tap on a button.
Now what i need is when ever tap on button i need to disable userinteraction to main view,and enable userinteraction to the subview.
For that i am trying this code on button click event.
[object.viewController.view setUserInteractionEnabled:NO];
here object is object of appdelegate class.
But,if i place this it disables userinteraction of subview also.
But i need to disable for only main view.
i think people get what my problem,
if not let me add a comment.
Thank u in advance.

You can add UITextField inside UIAlertView, so it will cover main view so (as you required) user could not interact with the main view.
Similar thread which discuss UITextField in UIAlertView on iPhone - how to make it responsive?
Here is You tube video to add UITextField inside UIAlertView
I hope it will resolve your problem.

i resolve my problem,instead of disable of user interaction of main views i disabling user interaction for contents in the view(Buttons,textfields...).
And enabling then when sub view while closing sub view.
Let me Know if there is any Better way than this.

try using an action sheet. they;re much more flexible. on second thought check out InputAlertView in this

Related

How to keep button functionality when adding other views on top of said button in a subclass?

I have a button in my app, but I have create a UIButton subclass that adds another view and a few labels on top of it. The problem is that now in my app the button does not respond to taps. How would I go about fixing this?
I was able to fix this problem by setting the view that was covering my button with the property
userInteractionEnabled = true
That allowed for the text to go through my view back to my button

How am I able to select items when using VoiceOver for supporting blind people?

I'm using VoiceOver in one of my Apps and want to make it more accessible to blind people.
When loading up a viewcontroller a scrollview is displayed with multiple textviews in there. I would like to automaticly select the first textview when opening up my viewcontroller. Is there a workaround for these needs?
I'm using a navigationcontroller and a tabbarcontroller. At the moment the voiceover selects the backbutton firstly but I would like to select another UI part.
A simple solution to automatically begin editing the first UITextView is to put this in the ViewDidLoad method:
[textView becomeFirstResponder];
Make sure you've setup your UITextView protocols and delegates and this should work.

Allow userinteraction iphone sdk?

Is is possible to allow the view to be editable (allow user interaction) when a UIActionSheet is in view? For example [nameofactionsheet showInView:self.view];. Normally whenever the action sheet is open the user can't play around with view behind it. Is it possible to allow interaction?
thanks
Not if you use UIActionSheet.
But you could implement with custom logic perhaps..
Wrap the UI in your custom view (for showing different choices)
Add that custom view to your desired view controller's view
Voila ;)

How to tell when a subView is removed a UIView

Basically i wanted to implement a popup UIView so i followed what was posted here
POP-UP UIView "IMDB App" style
This works very well. However i have one query. My main view is a tableView. so when a view is popped up i disable scrolling in the table. Now when the popup subView is removed, i need to re-enable scrolling. How do i achieve that? i can't use willRemoveFromSuperview because the popup view is loading a different NIB altogether.
Should i use Notifications?
hope i was clear with explaining the scenario.
Thanks in advance!
Feloneous Cat has the correct answer. This is the perfect use a #protocol in your popup view along with a registered delegate. Something is triggering that popup view to close. Whatever that trigger is, call the protocol and the delegate can handle the situation as needed.
Furthermore, when protocols are used correctly, your code becomes very reusable within a project as well as in other projects.
What you could do is subclass UIView and override removeFromSuperview to send a notification. I don't think there's ever a case where a view gets removed without using the removeFromSuperview method.

I want to use Subview like an alertview

I have an application , that has one mainviewcontroller with some button.When i click setting button in my application , i have added onesubview to MainView ([self.view addSubview:SettingSubView];)
Its work fine.subview frame width=200 and height=200.That subviews shows front of the mainview with center place adjusted.What i want is when subview is added to mainview, that time i dont want user interaction with mainview.Thats trick should be done in UIAlertView.When alertview is shown we cant able to touch anything in the mainview.i want to do same thing using subview.
One more thing is i dont want to add this subview as alert subview.
Is it possible ?
thanks in advance.......
Instead of making your SettingSubview a direct subviews of the main view, place a view in-between. This view should cover the entire main view and have a transparent (clearColor) background color.
Main view
-transparent view
--SettingSubview view
Try using UIActionSheet that would do, as i have done the same for one of my app