Tag: ios

When I click the back button my view changes from landscape to portrait

I am using storyboard and have my app set to be only horizontal left and right. I have a view controller where I click to go to my next view and do whatever, and when I am done I click the back button. What happens is when I click the back button the horizontal view […]

NOt able to convert from MPMediaItem(mp3 song) to NSData

I have tried following code : These is my delegate method of MPMediPickerController : – (void) mediaPicker: (MPMediaPickerController *) mediaPicker didPickMediaItems: (MPMediaItemCollection *) mediaItemCollection { // Dismiss the media item picker. [self dismissModalViewControllerAnimated: YES]; NSLog(@”%@ %d”,mediaItemCollection,mediaItemCollection.count); NSArray *newMediaItem= [mediaItemCollection items]; MPMediaItem *item=[[newMediaItem objectAtIndex:0] retain]; [self uploadMusicFile:item]; } This is my custom method MPMediaItem to NSData: […]

DebugLog Format string is not a string literal

My code looks like DebugLog(urlStr); urlStr is an NSString but I keep getting a warning saying Format string is not a string literal I got this code from a website. #ifdef DEBUG #define DebugLog(s, …) NSLog(s, ##__VA_ARGS__) #else #define DebugLog(s, …) #endif

Annotated pins are not getting loaded during reloading of map

I have used apple maps in my application for implementing maps.I used the following code for that. My problem is that,It is showing the pins only when it is loading for the first time. I have written the code like this – (void)viewDidLoad { [super viewDidLoad]; self.title = @”Locate Engineer”; [worldView setMapType:MKMapTypeStandard]; [worldView setShowsUserLocation:YES]; worldView.delegate […]

UILocalNotification firedate from picker

I am trying to implement an alarm type app that sets a UILocalNotification from a UIDatePicker (only time, no date). I kind of have it working except for the fact that lets assume it is 5:00 PM when the user tries to set the alarm. If they try to set the alarm for 4:45 PM […]

Can I create or use the view controller like SLComposeViewController for the social networks other than Twitter and Facebook

Can I create or use the view controller like SLComposeViewController for the social networks other than Twitter and Facebook? I want to have the similar look for all of the social networks interactions. Is it possible? If yes, how can I do it? Thanks in advance.

the app is not seen in itunes connect after successfull uploading from xcode

I uploaded the app from xcode, and it uploaded successfully. Then i discovered that this version appeared in “activity” and it was in processing state. Then in a minute it just dissapears everytime. I dont know what to do. I don’t know if apple sent me an email or not. Because the currently used developer […]

Fixing Crash :Critical failure: the LastResort font is unavailable

I am using this tutorial for using sqlite to insert 10000 entries using this code in my viewcontroller.m – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. [self AddTHousandsOfEntry]; } -(void)AddTHousandsOfEntry { for (int i=0; i<100500; i++) { NSString *regNo=[NSString stringWithFormat:@”%d”,i]; NSString *name=[NSString stringWithFormat:@”name%d”,i]; NSString *department=[NSString stringWithFormat:@”department%d”,i]; […]

How to draw custom line on MKMapview?

I’ve been searching for a way to draw a custom line, but the only help I can find is how to draw lines with an UIColor. I want to draw a straight line but not just with a color. I want the appearance of the line to be customizable. (So right now I can draw […]

How do I launch a new view right after a purchase is made and how can I make this view the new view at App Launch?

I want to add an in-app purchase that enables users to unlock some hidden content. Once the purchase has been made, I need the user to be automatically redirected to a new View. What’s more, this new view would then become the main view at App launch. I use MKStoreKit, and a new test user […]