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 Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 12-19-2011, 06:37 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2011
Posts: 4
petrol is on a distinguished road
Default UIKit and Cocos2d

HI, i want to open some popup window like UIAlertView but with UITextField in my cocos2d game to ask a username for highscore list, is there any control for this? i had never work with UIKIt controls before
petrol is offline   Reply With Quote
Old 12-21-2011, 04:08 AM   #2 (permalink)
Registered Member
 
Join Date: Dec 2011
Posts: 4
petrol is on a distinguished road
Default

nobody can answer?
i want to make something like this popup
petrol is offline   Reply With Quote
Old 12-21-2011, 07:00 AM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Location: Brazil
Posts: 11
rodrigoK is on a distinguished road
Default

Quote:
Originally Posted by petrol View Post
nobody can answer?
i want to make something like this popup
To show the UIAlertView with UITextField, you can use this code.
Code:
UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Your title here!" message:@" " delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
UITextField *myTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
[myTextField setBackgroundColor:[UIColor whiteColor]];
[myAlertView addSubview:myTextField];
[myAlertView show];
[myAlertView release];
On delegate of UIAlertView you can save name in your highscore DB or .plist file.


Regards,
__________________
Rodrigo Kieffer
---

rodrigoK is offline   Reply With Quote
Old 12-21-2011, 07:14 AM   #4 (permalink)
Registered Member
 
Join Date: Dec 2011
Posts: 4
petrol is on a distinguished road
Default

thanks rodrigoK, that is exactly what i want
petrol is offline   Reply With Quote
Old 12-22-2011, 08:36 AM   #5 (permalink)
Registered Member
 
Join Date: Dec 2011
Posts: 4
petrol is on a distinguished road
Default

there are one more problem, i can't change size of uialertview, i have changed statusbarorientation to landscape, and now want to init alertview with frame, and initwithframe method does not affect the size of alertview, every time the size of alert is the same, is there any way to change it ?

Last edited by petrol; 12-22-2011 at 08:39 AM.
petrol is offline   Reply With Quote
Old 12-22-2011, 10:25 AM   #6 (permalink)
Registered Member
 
Join Date: Jun 2010
Location: Brazil
Posts: 11
rodrigoK is on a distinguished road
Default

Quote:
Originally Posted by petrol View Post
there are one more problem, i can't change size of uialertview, i have changed statusbarorientation to landscape, and now want to init alertview with frame, and initwithframe method does not affect the size of alertview, every time the size of alert is the same, is there any way to change it ?
You need customize UIAlertView to change the size. I don't have an example, but you can found in google.


Regards,
__________________
Rodrigo Kieffer
---

rodrigoK 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



» Advertisements
» Online Users: 382
9 members and 373 guests
apatsufas, comicool, Creativ, Dalia, dansparrow, LunarMoon, mer10, Murphy, pbart
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

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