Search Results

Search found 8409 results on 337 pages for 'itunes sdk'.

Page 171/337 | < Previous Page | 167 168 169 170 171 172 173 174 175 176 177 178  | Next Page >

  • App Crashes Loading View Controllers

    - by golfromeo
    I have the following code in my AppDelegate.h file: @class mainViewController; @class AboutViewController; @interface iSearchAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; mainViewController *viewController; AboutViewController *aboutController; UINavigationController *nav; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet mainViewController *viewController; @property (nonatomic, retain) IBOutlet AboutViewController *aboutController; @property (nonatomic, retain) IBOutlet UINavigationController *nav; [...IBActions declared here...] @end Then, in my .m file: @implementation iSearchAppDelegate @synthesize window; @synthesize viewController, aboutController, settingsData, nav, engines; (void)applicationDidFinishLaunching:(UIApplication *)application { [window addSubview:nav.view]; [window addSubview:aboutController.view]; [window addSubview:viewController.view]; [window makeKeyAndVisible]; } -(IBAction)switchToHome{ [window bringSubviewToFront:viewController.view]; } -(IBAction)switchToSettings{ [window bringSubviewToFront:nav.view]; } -(IBAction)switchToAbout{ [window bringSubviewToFront:aboutController.view]; } - (void)dealloc { [viewController release]; [aboutController release]; [nav release]; [window release]; [super dealloc]; } @end Somehow, when I run the app, the main view presents itself fine... however, when I try to execute the actions to switch views, the app crashes with an EXC_BAD_ACCESS. Thanks for any help in advance.

    Read the article

  • Need some help with a join on ContentProviders

    - by Pentium10
    The documentation says Columns from the associated aggregated contact are also available through an implicit join. What's that implicit join? `Join with Contacts` String LOOKUP_KEY read-only See ContactsContract.Contacts String DISPLAY_NAME read-only See ContactsContract.Contacts long PHOTO_ID read-only See ContactsContract.Contacts. int IN_VISIBLE_GROUP read-only See ContactsContract.Contacts. int HAS_PHONE_NUMBER read-only See ContactsContract.Contacts. I am querying ContactsContract.Data, and I need to access as where clauses on the query IN_VISIBLE_GROUP and HAS_PHONE_NUMBER, that are defined in ContactsContract.Contacts. How can I make this possible?

    Read the article

  • NSString stringWithFormat question

    - by John Smith
    I am trying to build a small table using NSString. I cannot seem to format the strings properly. Here is what I have [NSString stringWithFormat:@"%8@: %.6f",e,v] where e is an NSString from somewhere else, and v is a float. What I want is output something like this: Grapes: 20.3 Pomegranates: 2.5 Oranges: 15.1 What I get is Grapes:20.3 Pomegranates:2.5 Oranges:15.1 How can I fix my format to do something like this?

    Read the article

  • Iphone geo location permission check

    - by Johnny Mast
    Dear Developers, Hi i have a quick question about the iphone (iOS) geolocation api's. Currenly i have a map in my application and the operating system will ask the user if it wants to allow the use of geolocations. Now thats all nice but the thing is i want to change my app when geolocations is allowed to a so called "Geo location" mode where new options are available or "standard" mode with less ui elements when permissions are not granted. What can i use to check if permission is granted?. So basicaly is that an api that tells me permission granted yes or no.

    Read the article

  • How can I detect if an iPhone OS device has a proximity sensor?

    - by Batgar
    The docs related to proximity sensing state that if the proximity sensing APIs are used on a device without a proximity sensor (i.e. iPod touch, iPad) they will just return as if the proximity sensor has fired. Aside from checking the [[UIDevice currentDevice].model] string and parsing for "iPhone", "iPod touch", or "iPad" is there a slicker way to determine if a proximity sensor is on a given device?

    Read the article

  • What is wrong with this code?

    - by Horatiu Paraschiv
    @protocol MyViewDelegate <NSObject> - (void) didFinishProcessing:(MyView*)myView; //compiler stops here with error @end @interface MyView : MySuperclass { id<MyViewDelegate> _delegate; } @property (nonatomic, retain) id<MyViewDelegate> delegate; @end When I try to compile I get " expected ')' before MyView ". Where is the error?

    Read the article

  • OpenGL ES - how to keep some object at a fixed size?

    - by OMH
    I'm working on a little game in OpenGL ES. In the background, there is a world/map. The map is just a large texture. Zoom/pinch/pan is used to move around. And I'm using glOrthof (left, right, bottom, top, zNear, zFar) to implement the zoom/pinch. When I zoom in, the sprites on top of the map is also zoomed in. But I would like to have some sprites stay at a fixed size. I could probably calculate a scale factor, depending on the parameters to glOrthof, but there must be a more natural and straightforward way of doing that, instead of scaling the sprites down when I zoom in. If I add some text or some GUI elements on top of the map, they should definately have a fixed size. Is there a solution to do this, or do I have to leave fixed values in glOrthof and implement zoom/pinch in another way? EDIT: To be more clear: I want sprites that zoom in/out along with the map, but stay at the same size. I have some elements that are like the pins on the iPhone's map application. When you zoom, the pins stay the same size, but move around on the screen to stay on the same spot on the map. That is mainly what I want a solution for. Solutions for this already came below, thanks!

    Read the article

  • Why do I have a memory leak in UIApplication

    - by saintmac
    I have an iphone app project. I analysed it using instruments memory leak tool. According to instruments I have 2 leaks the Trace is as follows: start main UIAplicationMain _run CFRunLoopInMode CFRunLoopRunSpecific PurpleEventCallback _UIAplicationHandleEvent sendEvent: handleEvent:withNewEvent: After this trace there are two separate traces. What causes this and how can I fix it?

    Read the article

  • Designing the iPhone interface in a nib or in code?

    - by Jacob Relkin
    I've been pondering over this question for a long time already. On the one hand, Interface Builder offers a really easy way to design the interface and wire the elements up with objects in code. On the other hand, in larger projects, Interface Builder becomes a hassle to maintain. Any suggestions would be greatly appreciated.

    Read the article

  • Fatsest way to edit alpha of CGImage (or UIImage) with touch and then display?

    - by Pankaj
    I have two image views, one on top of the another, with two different images. As the user touches the image and moves his/her finger, the top image should become transparent along the touch points with a fixed radius. (Like the PhotoChop app). Currently I am doing it this way... For each touch. Get a copy of the image buffer from CGImage of the top image. Edit the alpha channel of the buffer to create a transparent circle centered at the touch point. Create new CGImage from the buffer. Create UIImage from the CGImage and use the new UIImage as the top image view's image. This works but as you can see too many copy, creates are involved and it is slow. Can somebody please suggest me a faster way of doing the same thing?

    Read the article

  • Android Screen Density Compatibility on 1.5

    - by fordays
    Hi, I'm getting ready to release my first application the marketplace. It's being written for devices running Android 1.5 and above, however there aren't any specific folders for the three different screen densities (I think those came around in 1.6). Should I make these folders myself? Where should I put image resources for the different densities and what should I put in my Manifest??

    Read the article

  • Connecting ipad to external monitor

    - by Josh P.
    I am trying to connect my ipad app to an external screen using the following (not checking the correct resolution for no - just want it up and running). - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [window addSubview:[navigationController view]]; if ([[UIScreen screens] count] > 1) { window.screen = [[UIScreen screens] objectAtIndex:1]; } [window makeKeyAndVisible]; return YES; } Is this supposed to redirect everything to the external monitor? How dows it work with touches/gestures? I see in the Apple apps, the controls etc are left on the ipad screen...

    Read the article

  • iphone file download not working

    - by Anonymous
    Hi, In my app I 'm first connecting to a web service, which in return sends a url for a file. I use the url to download the file and then display it on the new view. I get the correct URL but not able to download file from that location. I have another test app which will download file from the same location and it works like a charm. following is my code for webservice-file download. This is a snippet of the code where i 'm parsing the web service xml and then pass the result to NSData for file download. Any suggestions where am i going wrong -- I 'm referring to the following tutorials. Web Service PDF Viewer if ([elementName isEqualToString:@"PRHPdfResultsResult"]) { NSLog(soapResults); UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Report downloaded from:" message:soapResults delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; NSData *pdfData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:soapResults]]; //Store the Data locally as PDF File NSString *resourceDocPath = [[NSString alloc] initWithString:[[[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Documents"]]; NSString *filePath = [resourceDocPath stringByAppendingPathComponent:@"myPDF.pdf"]; [pdfData writeToFile:filePath atomically:YES]; [alert show]; [alert release]; [soapResults setString:@""]; elementFound = FALSE; }

    Read the article

  • UITextView cut problem !

    - by Mc.Lover
    Hi , i have problem with cut some text from UITextView , i idon't understand how can implement Cut , for example copy or paste it's like this : -(IBAction)copy { NSString *copyString = [[NSString alloc] initWithFormat:@"%@",[textPad text]]; UIPasteboard *pb = [UIPasteboard generalPasteboard]; [pb setString:copyString]; } -(IBAction)paste { UIPasteboard *pb = [UIPasteboard generalPasteboard]; textPad.text = [pb string]; } but about cut ! thank you ,

    Read the article

  • Can't add to NSMutableArray from SecondaryView

    - by Antonio
    Hi guys, I've searched and read and still haven't found a concrete answer. Brief: I have an application where I declare an NSMutableArray in my AppDelegate to synthesize when the application loads. (code below). I have a SecondaryViewController call this function, and I have it output a string to let me know what the array size is. Every time I run it, it executes but it does not add any objects to the array. How do I fix this? AppDelegate.h file #import <UIKit/UIKit.h> @class arrayTestViewController; @interface arrayTestAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; arrayTestViewController *viewController; NSMutableArray *myArray3; } @property (nonatomic, retain) NSMutableArray *myArray3; @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet arrayTestViewController *viewController; -(void)addToArray3; @end AppDelegate.m file #import "arrayTestAppDelegate.h" #import "arrayTestViewController.h" @implementation arrayTestAppDelegate @synthesize window; @synthesize viewController; @synthesize myArray3; #pragma mark - #pragma mark Application lifecycle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { myArray3 = [[NSMutableArray alloc] init]; // Override point for customization after application launch. // Add the view controller's view to the window and display. [window addSubview:viewController.view]; [window makeKeyAndVisible]; return YES; } -(void)addToArray3{ NSLog(@"Array Count: %d", [myArray3 count]); [myArray3 addObject:@"Test"]; NSLog(@"Array triggered from SecondViewController"); NSLog(@"Array Count: %d", [myArray3 count]); } SecondViewController.m file #import "SecondViewController.h" #import "arrayTestAppDelegate.h" @implementation SecondViewController -(IBAction)addToArray{ arrayTestAppDelegate *object = [[arrayTestAppDelegate alloc] init]; [object addToArray3]; }

    Read the article

  • Render only a portion of a PDF on iPhone/iPad

    - by Infinity
    Hello guys! I am rendering my pdf in an UIView's drawRect method. Here's my code: - (void)drawRect:(CGRect)rect2 { NSString *filename = @"lol.pdf"; CFStringRef path = CFStringCreateWithCString (NULL, [filename UTF8String], kCFStringEncodingUTF8); CFURLRef url = CFURLCreateWithFileSystemPath (NULL, path, kCFURLPOSIXPathStyle, 0); CGPDFDocumentRef pdf = CGPDFDocumentCreateWithURL(url); CGPDFPageRef page = CGPDFDocumentGetPage (pdf, 1); CGAffineTransform m; CGContextRef context = UIGraphicsGetCurrentContext(); CGRect aRect = CGRectMake(0, 0, 768, 1024); CGContextTranslateCTM(context, 0.0, aRect.size.height); CGContextScaleCTM(context, 1.0, -1.0); m = CGPDFPageGetDrawingTransform (page, kCGPDFMediaBox, aRect, 0, YES); CGContextSaveGState (context); CGContextConcatCTM (context, m); CGContextClipToRect (context,CGPDFPageGetBoxRect (page, kCGPDFCropBox)); CGContextDrawPDFPage (context, page); CGContextRestoreGState (context); } It renders the whole pdf. How can I render only a part from it? Can you help me with it?

    Read the article

  • How to change format of date/time?

    - by 4thSpace
    I have this date and time format: 2010-05-19 07:53:30 and would like to change it to: Wednesday @ 7:53PM 5/19/2010 I'm doing this, which gets the current format: NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss"; but when I change the format, I end up with a null. For example: formatter.dateFormat = @"hh:mm tt MM-dd-yyyy"; date = [formatter stringFromDate:formattedDate]; date will be null. I want to put the end result into an NSString. It would be nice if time and date could come out as separate properties so I can arrange them however I like. Any ideas on how I can change the formatting?

    Read the article

  • To Make an item wiggle and delete

    - by gbf.sara
    I need to delete/remove an item in my Iphone application. For that i should make tat item wiggle(shake) when i give long press. And then it should ask for an alert to delete or not??? Can anyone guide me plz??? It ll be more helpful if u help me with a source code Tanx in advance

    Read the article

  • Is there a way to hide the Android Device Chooser?

    - by janfsd
    Whenever I run my app I get the Android Device Chooser dialog: This is happening because I am using the Google APIs for 1.6 and trying to run the application on my Nexus one. Is there any way to make this automatically, or to not check the compatibility? Sometimes when I make a modification and quickly after I save and run the application, Eclipse will build the project and the Android Device Chooser dialog will show briefly and disappear and the app won't run. I have to click run again for it to work. Any workarounds?

    Read the article

  • Should i use remote or local service for this scenario?

    - by rayman
    Hi, I need to build some kind of listener, now this listener suppose to run activies of diffrentz appz , i want this listener to be as a service that will run the appropriate activity, should i make it as a remote service or local service(for this i need some app to hold it - make sense?) what will fit in? thanks, ray.

    Read the article

< Previous Page | 167 168 169 170 171 172 173 174 175 176 177 178  | Next Page >