SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
07/16/15 10:47 PM (9 years ago)

Nifty! Using 'pretty function' in your xcode Debugger statement...

I almost *always* have a debugger statement at the beginning of my methods that states the class and the method, so if something goes wrong, I have a bit of indication of where to start looking. Nothing new to that; a lot of us do that. But I just discovered an Xcode 'macro' that will print it out for you. Instead of using: [BT_debugger showIt:self theMessage:@"Class Name: Method Name"]; Substituting the actual class and method names... depending on the plugin, this could be many many times... You can now cut and paste this into *all* methods, and it will print Class and Method names: [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; and the output will be similar to: -[SW_beaconControl sw_CreateBannerView] (beaconControl is the Class name, create banner view is the method) Try it! Next project just use this and save a bit of time and typing. Cheers! -- Smug
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
07/17/15 01:51 AM (9 years ago)
Thank you Smug for the tip!
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
07/17/15 09:19 AM (9 years ago)
Great tip, Smug. Thanks!
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
07/17/15 06:46 PM (9 years ago)
You looking mighty pretty over there Smug! :-)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.