Hi.
In MyappAppDelegate.m file at "application: didFinishLaunchingWithOptions:" method, I just wrote:
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy"];
NSDate *date = [NSDate date];
NSLog(@"%@", [df stringFromDate:date]);
return;
And ran with iPhoneSimulator, console said:
2010-10-15 20:38:43.571 M...
Hi!
In XCode, if I have an NSString containing a number, ie @"12345", how do I split it into an array representing component parts, ie "1", "2", "3", "4", "5"... There is a componentsSeparatedByString on the NSString object, but in this case there is no delimiter...
Any help is much appreciated!
Graham
...
I have an XCode project in SVN.
I would like to relocate some files from one physical directory to another but can't seem to find a way to do this in XCode.
If I do the move in XCode it simply moves the file references from one Group folder to the next, without changing their location on disk.
If I move the files in Organizer - well Orga...
When you create a default iphone OS project in xCode, you have a main.m in "Other Sources" on the side panel in xCode. How does the int main() in there use argc and argv and why does it need it?
Thanks :)
...
I'm trying to assign blue text like this, exactly like this
I'm using my own text field.
In hex the color is #336699
I need to access my text color to this, I would have liked to use a UIColor but there doesn't seem to be one.
...
My goals is search bar on top my table that searches the track_tiles in Dictionary. This table was built by Parsed data into an NSDictionary. My Dictionary for the table looks like...
tracksDict: {
"Cold Calling" = (
"<Track: 0x5f39bc0>",
"<Track: 0x5f3a3e0>",
"<Track: 0x5f3a990>",
"<Track: 0x5f3...
hello all,
i have a button when i try to write myButton. then if I click esc button there is not options or any intelligent result.
thanks
...
I need to add this to my dismiss button :-
[self dismissModalViewControllerAnimated:YES];
[self release];
else
[self.view removeFromSuperview];
I thought
if( self.navigationController.modalViewController ) {
would work be it nevers true
...
hello this is my code is it wrong
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"Inside touchesBegan");
UITouch *touch = [[event touchesForView:self.view] anyObject];
CGPoint location = [touch locationInView:touch.view];
NSLog(@"pointx: %f pointy:%f", location.x, location.y);
NSLog(@"a...
I want to convert a NSString into a const char * in order to access a sqlite DB.
This works:
NSString *queryStatementNS = @"select title from article limit 10";
const char *queryStatement = [queryStatementNS UTF8String];
This causes a crash in the simulator (without any stacktrace):
NSString *queryStatementNS = [NSString stringWithF...
i have some data in text format and i want to convert that data to pdf format and then attatch to mail..
i dont want to open that pdf in app...
...
How can i take screenshot from code ?
...
How can i get sound from iphone/ipod library?(means like read photo from photo library)
...
I set a local notification with key "notify" and know that i can delete it with below code but don't know how to declare 'notification' for key "notify" to delete it
[[UIApplication sharedApplication] cancelLocalNotification:notification];
...
Hi
I have this application which is saving tweet messages from twitters public time line.
For that I have created a "Tweet" entity in my model & has generated a managed object class from XCode.
I have declared Tweet ivar in my controller class & have synthesized it but when I try to put some value in it like
tweet.text = @"Some parse...
I'm trying to add a label I think thats what they are called...
.. just like I've done several times before to exit a function without processing some code and I'm getting the error 'label at end of compound statement' why ? what do i need to do instead ?
...
I'm getting these analyzer warnings, are they due to goto statements ?
--- snip ---
...
I've struggled to get a login / startup view to show before my mainWindow nav controllers and its finally working, but I'm now getting these analyzer warnings. If I release the navigation controller, the release in the dismiss button with cause an error.
what should I do here ?
...
Hi, I'm creating a simple application with xcode and objc and I need to load an NSDictionary from a file, but I can't get the path to the file using NSBundle:
NSString *l = [[NSBundle mainBundle] pathForResource:@"LoginStatuses" ofType:@"plist"];
NSLog(@"%@", l);
When I run this code I get this:
2010-10-16 10:42:42.42 Sample[5226:a0f...
... with a button outside of the uiwebview?
please see screenshot attached.
the thing is, that I have a local html site in the webview, that goes to further local web sites. I want the user to be able to get back to the "home page" of the local website by clicking on the "home" button on the top, which is not part of the uiwebview.
(m...