Both work, but... Which one would you use and why ?
@implementation NSString (Extender)
-(NSString *) stringByTrimmingPrefix:(NSString *)strPrefix
{
while ([self hasPrefix:strPrefix])
{
self = [self substringFromIndex:strPrefix.length];
}
return self;
}
@end
or
@implementati...
are their any reasons why my UIActionSheet would be taking a while to load. It works fine just after lauch, but as soon as I loop through some actions once or twice, is loads very slow, and you can see the grey backdrop crawl down to finish drawing the sheet.
help?
Sam
...
Does anyone have a sample, or link to one, of how to create a counter that looks like the Inbox counter?
Any help appreciated // :)
...
is there a way to convert a float to an Int by rounding to nearest whole integer?
cheers
Sam
...
I expected this code to replace the hate with some love.
NSMutableString *teststring=@"I hate programming my iPhone";
NSString *overwriteSource=@"love";
NSRange temprange=NSMakeRange(2, 4);
[teststring replaceCharactersInRange:temprange withString:overwriteSource];
NSLog(@"%@",teststring);
This terminates due to an uncaught e...
Hi,
I have a small level based iPhone app. I need to load and release sound files for each level.
Everything works fine with my openAL SoundManager except releasing sounds.
At first, when I remove a sound, it seems to do what it is meant to do – it removes the sound and I can’t access it again unless I reload it. BUT, when I test my ap...
I am using the exp and pow functions in a program for iPhone, which would use the math.h library if I was programming in C. What is the equivalent I need to use in iPhone SDK so my two functions will work properly?
...
Ok, I've run into a small issue here. I'm trying to filter two things in my UITextField. They include limiting the number of characters and filtering the type of characters. I can get each one to work by there self but they both don't work together. It may have something to do with the double returns, idk. Hopefully someone can look at m...
I have a UIViewController inside of a navigation based app. I'd like the view controller to receive all touch events from child objects, such as a tableview and navigation bar. Or, any other technique that is able to intercept all touch events.
Right now, the following never executes inside of the view controller:
- (void)touchesE...
I'm looking for suggestions on the best way to implement a full-text search on some static data on the iPhone.
Basically I have an app that contains the offline version of a web site, about 50MB of text, and I'd like for users to be able to search for terms. I figure that I should somehow build an table of ("word", reference_to_file_con...
I am trying to improve the performance of scrolling in our app. I have followed all of the generally accepted advice (draw it yourself with CG, the cell is opaque, no subviews, etc.) but it still stutters sometimes when we have background CPU and network activity.
One solution stated here:
http://www.fieryrobot.com/blog/2008/10/08/mor...
I have a few apps on the iPhone app store, and I have some questions about how my app description is available on third party sites. There are other websites that advertise and promote apps just like the app store, how do they get all the info? Is there some sort of RSS feed from Apple that I don't know about?
I have also gotten a few e...
Hello!
I created a new project from SDK 3.1 and OpenGL ES template. As you know this new template has ES 1.1 and ES 2.0 implementations. I wanna deal with ES 1.1 part first :) so I changed Base SDK in project settings to Simulator 3.0 and then I changed Active SDK in upper left corner of Xcode to "Simulator 3.0 - Debug". But when I star...
Is there a IRC library that is suitable for use on the iPhone?
...
When I created an ad-hoc provision to test my app remotely, the landscape setting malfunctions. The app is supposed to be landscape with the home button on the right. When I create an adhoc provision for one of my devices here, it works fine. One of my devices a coworker is using remotely, however, shows the app in portrait mode (so t...
I'm currently working on persisting the UI state of my iPhone app across launches, but it's proving to be a bit of an issue in one of my controllers - a sub-classed MFMailComposeViewController.
Essentially, I need to store (on app exit) the current To/CC/BCC lists, the subject, and the body so I can set the view up again after a relaunc...
Hello,
I have the following function in my iPhone project which works great...unless the query returns nothing and then the app crashes. It is being a pain to debug with none of the breakpoints being activated at all!
I know this works as I pass in static stuff that is in the DB and it returns a value.
-(NSString *)getSomeText:(NSStr...
Why my ABPersonViewController is not showing all the properties? Currently it is showing only phone number properties. It is not the e-mail ids, addresses, birth day and other info. My contact has all this info. How the Phonebook's/Contact's ABPersonViewController is showing all this info? And How can I get the "Text Message", "Share Con...
Hi all,
I'm confused about how to implement a specific piece of an app. The data is being collected in a Grouped Table, but certain rows drill down to another screen to allow the user to choose something. So for example, I would have
Name:
Surname:
Age:
How do I get this Age value back to the first view when the user taps done ?
...
Hello,
Cut to the chase I have recreated my problem as it is fairly self explanatory.
this complies without error:
switch (n) {
case 1:
NSLog(@"");
NSString *aStr;
break;
default:
break;
}
this compiles with error and it's only missing the NSLog():
switch (n) {
case 1:
NSStri...