Re: Hiding with a background touch
Re: Hiding with a background touch
- Subject: Re: Hiding with a background touch
- From: Howard Siegel <email@hidden>
- Date: Sat, 09 Apr 2011 18:01:45 -0700
Are you using XCode3 or Xcode 4? They kind of changed the menu structure from Xcode 3 to Xcode 4 and now the Send to Back isn't as easy to find, and off hand I don't remember where Xcode 4 has it since I've only barely started to use it. In Xcode 3, it is not in the attributes window, but is in Layout pull down menu from the IB menu bar.
A different procedure, which works no matter which version of Xcode you are using, is to go in to IB and expand the view hiearchy that contains your button. Then just drag it to the top of the list (items at the top of the list are behind items at the bottom of the list).
You wouldn't happen to be using the Sams "Teach Yourself iPhone Application Programming in 24 Hours", would you?? That is the method he uses to detect background touches.
A different method, which I think is better is better, and doesn't use an invisible button, is to change the underlying view type in IB from UIView to UIControl and then hook up your IBAction method to the Touch Down event. To change the underlying class, select the view in IB and go to the Identity Inspector (Cmd-4) and in the Class Identity section at the top, change the class from UIView to UIControl. This makes more actions available. This works because UIControl is a subclass of UIView. This is the method that Mark, Nutting, and LaMarche in their book "Beginning iPhone 4 Developement: Exploring the iOS SDK".
- h
On Sat, Apr 9, 2011 at 17:33, Erick Garske
<email@hidden> wrote:
I have just updated xcode to 4.01.
I am attempting to follow documentation for hiding a numeric keyboard
by pressing a custom button that has been modified to appear in the
background. Specifically, the documentation states:
"Because this button needs to be invisible, make sure it is selected,
and then open the Attributes Inspector (Command+1) and set the type to
Custom. Use the resizing handles to size the button to fill the entire
view. With the button selected, choose Layout, Send to Back to
position the button in the back of the interface."
Unfortunately, I do not see "Layout" in the attributes window
associated with the button. Is "Layout" elsewhere or his this
technique been deprecated with the new version of x-code?
Thanks,
Erick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden