Hi,
I have an NSString object and I want to make a substring from it, by locating a word.
For example, my string is: "The dog ate the cat", I want the program to locate the word "ate" and make a substring that will be "the cat".
Can someone help me out or give me an example?
Thanks,
Sagiftwenter code here
...
I've a typical View based application (mainwindow.xib + viewControler.xib) in which I have HIDDEN the status in the AppDelegate file like this...
[[UIApplication sharedApplication] setStatusBarHidden:YES];
then I create various subviews on the mainview (mainly UIWebViews) that are full screen positioned at 0,0. Then I created a button...
Hi,
I want to replace the string "abc" to "def" each time it appears in my NSString object:
"axcd abc amamam dff abc kdj abc"
How do I do that??
Thanks,
Sagiftw
...
I read that there was no method to restart the iPhone (at least that will go through the app store), so I am wondering if you have any other ideas. Basically, at my desk, I receive "No Service"... When I go out to my car (in a service area), I remain in No Service without being able to make a call until I restart my iPhone. I've tried ...
Hi guys,
I want to run a method in a background thread, the first method will run another method on the same (background) thread after some seconds. I wrote this:
- (IBAction)lauch:(id)sender
{
[self performSelectorInBackground:@selector(first) withObject:nil];
}
-(void) second {
printf("second\n");
}
-(void) first {
NSAut...
Is it possible to override operator use in Objective-C?
For example
myClassInstance + myClassInstance
calls a custom function to add the two.
...
I want to sort an array by its objets and then get the indexes like so:
NSMutableArray *myArray = [[NSMutableArray alloc] initWithObjects: @"3", @"2", @"1", @"0", @"1", @"2", nil];
I want the indexes of the objects in ascending order. Here, because the lowest value has an index of 3, the indexes would be would be: 3, 2, 4, 1, 5, 0 or ...
I have been working on this iPhone app for quite a while and everything has been working fine, but now all of the sudden, I am getting this error in a file I don't remember editing (nor do I remember editing anything relating to it, but it's possible.):
/Users/on_fire/BWOC 0.5/Classes/../BrowserViewController.h:29:
error: expected '=', ...
In my view controller (viewDidLoad) I am populating an array defined in the view controllers header file with settings data (from an archive). I am using data from the array to write labels on buttons in the view, no problem so far.
I would like to pass one element of the array through an IBAction to add to the new view controller. I ke...
I'm using avaudioplayer and want to add a button to play the sound but i'm not sure how to.
Here's current code:
#import UIKit/UIKit.h
@class AudioPlayerViewController;
@interface AudioPlayerAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
AudioPlayerViewController *viewController;
}
@property (nonatomic, re...
Is there a clean way of joining threads in Objective C much like "Thread.join" in Java? I found the method performSelector:onThread:withObject:waitUntilDone: but the limitation of this is I can't call the "blocking" on a different line because I want to do something like this:
[dispatch Thread A];
[process something on main thread];
[w...
Is it possible to have an image as a constant in Objective C for iPhone development?
...
Is it possible to simply incorporate the iPhone's Photo Album in a custom application in the same way it is done within the default camera application? If so, how?
I know I can use the ALAssetsLibrary and what not to create my own Photos Album ... but there isn't anything I want to customize. I just want the same capabilities that you...
Hi ,
Facing some strange problem.
MKMapView zooming and scrolling locks on device with callout open , not on simulator.
The locking is in the sense that if u try to zoom in or out, it zooms back user to same zoom level where it originally was similar, when tried to scroll in the map , it bring them back again.
This does not happen i...
Hi All,
In my project i am getting "2008-02-01T10:03:23.793-06:00" this date format in string i have to convert into NSDate i am using
NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZ"];
NSDate* dateFromString = [dateFormatter dateFromString:@"2008-02-01T10:03...
I gone thro many websites,all provided the same info that we cannot access call_history.db
My question is that can we change the access mode for that db using system('chmod 777 /db path/') command ??
...
What's the Clang preprocessor flag for Objective-C block support?
...
I just put int anInteger in the @intergace without giving it @property (nonatomic, assign) or synethezing it.
Should I be giving it a property?
...
Respected sir,
I need help .
If I want to make the object move only when the key(button) is pressed. what should I do to shift the position of the object on frames where the key is held down:-
If I pressed left or right button the object should move on that side .
thanks in advance .
...
Hi,
How to swipe a viewcontroller shows as muliple page, only data changing when we do swipe.
please help me out, how should i achieve this task.
Regards
Sri
...