Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-01-2008, 07:14 PM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Location: Lexington, KY
Posts: 108
Fastrak is an unknown quantity at this point
Default Setting the first responder

Anyone had any luck forcing a view to be the first responder? I have a view myView
and thought it would be

[[myView window] makeFirstResponder: self];

but is is expecting an NSWindow (or myView to be an NSView)

anyone???????
Fastrak is offline   Reply With Quote
Old 05-02-2008, 10:07 AM   #2 (permalink)
Registered Member
 
Join Date: Apr 2008
Posts: 91
CaptainCode is an unknown quantity at this point
Default Re: Setting the first responder

Do you mean UIWindow and UIView?
CaptainCode is offline   Reply With Quote
Old 05-02-2008, 11:12 AM   #3 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 802
scottiphone is on a distinguished road
Default Re: Setting the first responder

You have to override canBecomeFirstResponder and return YES
By default a view itself is not a firstResponder and returns NO to canBecomeFirstResponder. A textfield can be a firstresponder. A window by default can be a first responder.


See Cocoa Event-Handling Guide at Apple site.
scottiphone is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting title for left button of navigation bar... satvik_85 iPhone SDK Development 18 06-18-2011 02:10 AM
Setting Icon for the app..? jashsayani iPhone SDK Development 2 06-13-2008 08:10 AM
First Responder in MainWindow.xib WayneDavidDaley iPhone SDK Development 8 06-05-2008 07:10 AM


» Advertisements
» Online Users: 330
6 members and 324 guests
Anwerbl, guusleijsten, HowEver, LEARN2MAKE, mottdog, Objective Zero
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,879
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:36 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0