Hi
In my universal application I m using the below code for UILocalNotification
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
// Get the current date
NSDate *pickerDate = [self.datePicker date];
// Break the date up into components
NSDateComponents *dateComponents = [calendar components:( NSYearCal...
In XCode, when I open project settings, I only see the following two choices for the setting "Architectures": 'Standard (armv6 armv7)' and 'Optimized (armv7)'.
How can I get the choice of 'Optimized (armv6 armv7)' to appear?
I'm using XCode 3.2.3.
...
I am building a social app that has a chatView. Message is an entity. On the usersViewController (rootViewController), I want to just display the number of unread messages from each user. But on the chatView, I want to show the messages sent between me and the selected user.
How should I fetch the messages from Core Data?
Is there a w...
I've created an NSOperation in the queue like so:
ImageLoadingOperation *operation = [[ImageLoadingOperation alloc] initWithImageURL:url target:self action:@selector(didFinishLoadingImageWithResult:)];
[operationQueue addOperation:operation];
[operation release];
And this works fine but if the view gets popped before the operation fin...
Hello. I'm struggling sending POST data to a server and receiving the correct response. I started by using setHTTPBody but moved to setHTTPBodyStream when I wasn't getting the correct server response for certain POST data and I read setHTTPBody has a memory leak on earlier iOS versions. The problem is setHTTPBodyStream causes the error -...
I want to build a site to introduce my phone apps and guide users to the app store. is there any good theme or template for me to get start?
I need to put all my apps together and have separate page for single one.
...
Hello,
I just started developing with the iPhone SDK and I have a problem with switching to another tab with the UITabBar.
This is my current code, and it works so far:
myAppAppDelegate *appDel = (myAppAppDelegate *)[[UIApplication sharedApplication] delegate]
[appDel.tabBar setSelectedViewController:[appDel.tabBar.viewControllers obj...
Hi, everyone,
I want to ask a question about the iPhone application. Does Apple provide any API for developers to get the weather information? Thank you.
...
okay so I want to make a public function that will return YES if an object exists, conforms to a protocol and responds to a selector. I know the typedef of @selector is SEL but what is the typedef for @protocol
BOOL conforms(id object, ? prototype, SEL action) {
return (object != nil
}
And I want to be able to call this function l...
NSString *url = @"http://stackoverflow.com/questions/ask";
How can I get the character position of the 4th "/" ?
...
I have a UIAlertView set up with a textfield like so:
//***first set of code***
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"User Input Required" message:@"Please enter data into the field" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
[alert addTextFieldWithValue:nil label:@"[Enter Text]"...
Hi, can someone please explain why you should use "viewWithTag" to get subviews (e.g. UILabel etc) from a cell in "dequeueReusableCellWithIdentifier"?
Some background info: I've got a custom UITableViewCell with a couple of UILabels in it (I've reproduced a simple version of this below). These labels are defined in the associated NIB fi...
I am currently using the following code to write a CGContext to a PNG on disk:
CGImageRef image = CGBitmapContextCreateImage(context);
UIImage *myImage = [UIImage imageWithCGImage:image];
NSData *data = UIImagePNGRepresentation(myImage);
[data writeToFile:path atomically:YES];
I found that the orientation of the resultant file is flip...
I have to make an iPhone app for a company which has a web based system, and wants to go mobile. Its known in advance that the UI of the screen will change fairly often (adding new labels, buttons, etc). Also, many elements on the screen have an If(condition) then (visible) else (hidden) type situation. For instance, if(user.isMember) th...
NSArray *array=[contentOfResponseDataInJsonValue JSONValue];
NSLog(@"%@",array);
prints:
(
(
(
"\U515c\U639b\U8e55",
AABENRAA,
" o b\U8c46n lu\U8eab"
)
),
(
),
en
)
but
if (array==nil) {
return returnStr=@"";
}else {
returnStr=[[[array objectAtIndex:0] objectAtInd...
How can I play a movie in my app? I tried using this code, but xcode gives me this error:
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"welcome" ofType:@"mp4"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
movieView = [[MPMoviePlayerViewController alloc] initWithContentURL: m...
I've done a decent amount of reading about how to profile iPod applications using Shark, and all works well until I try to click "Start" (and nothing happens). I've tried profiling an individual process (app), all processes, and it doesn't seem to Start. This tutorial is one place that I used to set it up (so I think I'm following all ...
I have an iPhone app that I would like to port over to the iPad, but I would like to have as little duplication as possible.
How do people usually go about doing this?
In xcode can you have different targets for iPhone and iPad and perhaps do some pre-processor checks? Or is it best to simply have two separate projects altogether?
Not...
I've submitted all the details into iTunes connect and my app status is 'prepare for upload'. However, after I build and archive and select 'validate application', nothing happens. Any ideas what could be causing that?
...
Alright what I am trying to do is:
given an image where there is a circle within that image that is "blank". I want to take an existing image from user library and then mask it so that only a certain part of that image is shown on the "blank" image..
I have tried a few masking code but they all seem to work the other way around ... ...