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 08-02-2010, 11:09 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 8
Chuckmist3r is on a distinguished road
Question N00b question

I have used these forums without being a member for awhile now, and finally I found something that I really need help on and can't find it mentioned anywhere.

I want to know if it is possible to use the line

Code:
[self performSelector:@selector(path5) withObject:nil];
with "path5" being a NSString of the method name. I only want to do this to save space, because my game is running about 314MB right now, and would prefer not to get much bigger.

Is this possible? and if so could you please explain how this is done, I have tried multiple variations of the code and can not get it to work.

Thank you in advance,
Charles
Chuckmist3r is offline   Reply With Quote
Old 08-02-2010, 11:19 AM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

I believe there is a method NSSelectorFromString


Code:
SEL sel = NSSelectorFromString(@"myMethod");
smithdale87 is offline   Reply With Quote
Old 08-02-2010, 11:34 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 8
Chuckmist3r is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
I believe there is a method NSSelectorFromString


Code:
SEL sel = NSSelectorFromString(@"myMethod");
Yes, I tried that and for some reason it gave me an error, but after looking back through my code, I realized I had declared my path5 string to the wrong method, so Thank You very much for the help, it works now.
Chuckmist3r is offline   Reply With Quote
Reply

Bookmarks

Tags
functions, nsstring, problem, selector

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: 329
8 members and 321 guests
alexP, gordo26, headkaze, mistergreen2011, nobstudio, rayjeong, Sloshmonster, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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