0

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.

Mahesh Babu
  • 3,395
  • 9
  • 48
  • 97

3 Answers3

2

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.

Community
  • 1
  • 1
Waqas Raja
  • 10,802
  • 4
  • 33
  • 38
1

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.

Mahesh Babu
  • 3,395
  • 9
  • 48
  • 97
0

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

Rich
  • 1,082
  • 7
  • 11