Search Results

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

Page 99/337 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • Core Location in iPhone Simulator 3.2 (iPad)

    - by choise
    So, i'm trying to port my app to iPad. I'm using CoreLocation. Apple says the iPad does have Location: Wi-Fi Digital compass Assisted GPS (Wi-Fi + 3G model) Cellular (Wi-Fi + 3G model) so it should be possible to get the position of my ipad (at least with 3g model) about 3km radius would be enought. but it doesnt work in simulator (3.2 ipad) (running 3.1.3 in simulator simulates me cupertino). is there a way to get the position in simulator (3.2 ipad) ? i live in germany and here the ipad isnt released yet, so i cannot test it on my device. thanks!

    Read the article

  • Timeout a NSThread after a certain amount of time

    - by Zen_silence
    Hello, I have a NSThread that i would like to timeout after a certain amount of time. [NSThread detachNewThreadSelector:@selector(someFuntion) toTarget:self withObject:nil]; - (void) someFunction { //Some calculation that might take a long time. //if it takes more then 10 seconds i want it to end and display a error message } Any help you can provide on this would be greatly appreciated. Thanks, Zen_silence

    Read the article

  • Finding out estimated duration of a stream using Core Audio

    - by Reflog
    I am streaming a MP3 over network using custom feeding code, not AVAudioPlayer (which only works with URLs) using APIs like AudioFileStreamOpen and etc. Is there any way to estimate a length of the stream? I know that I can get a 'elapsed' property using: if(AudioQueueGetCurrentTime(queue.audioQueue, NULL, &t, &b) < 0) return 0; return t.mSampleTime / dataFormat.mSampleRate; But what about total duration to create a progress bar? Is that possible?

    Read the article

  • How to call PopOver Controller from UITableViewCell.accessoryView?

    - by Vic
    Hi, First I would like to say that I'm really new to ipad/ipod/iphone development, and to objective-c too. With that being said, I'm trying to develop a small application targeting the iPad, using Xcode and IB, basically, I have a table, for each UITableViewCell in the table, I added to the accessoryView a button that contains an image. Here is the code: UIImage *img = [UIImage imageNamed:@"myimage.png"]; UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; CGRect frame = CGRectMake(0.0, 0.0, img.size.width, img.size.height); button.frame = frame; // match the button's size with the image size [button setBackgroundImage:img forState:UIControlStateNormal]; // set the button's target to this table view controller so we can interpret touch events and map that to a NSIndexSet [button addTarget:self action:@selector(checkButtonTapped:event:) forControlEvents:UIControlEventTouchUpInside]; button.backgroundColor = [UIColor clearColor]; cell.accessoryView = button; So far, so good, now the problem is that I want a PopOver control to appear when a user taps the button on the accessoryView of a cell. I tried this on the "accessoryButtonTappedForRowWithIndexPath" of the tableView: UITableViewCell *cell = [myTable cellForRowAtIndexPath:indexPath]; UIButton *button = (UIButton *)cell.accessoryView; //customViewController is the controller of the view that I want to be displayed by the PopOver controller customViewController = [[CustomViewController alloc]init]; popOverController = [[UIPopoverController alloc] initWithContentViewController: customViewController]; popOverController.popoverContentSize = CGSizeMake(147, 122); CGRect rect = button.frame; [popOverController presentPopoverFromRect:rect inView:cell.accessoryView permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; The problem with this code is that it shows the Popover at the top of the application View, while debugging I saw the values of "rect" and they are: x = 267 y = 13 so I think it is pretty obvious why the PopOver is being displayed so up on the view, so my question is, how can I get the correct values for the PopOver to appear just below the button on the accessoryView of the cell? Also, as you can see, I'm telling it to use the "cell.accessoryView" for the "inView:" attribute, is that okay?

    Read the article

  • UIImages not displaying in TableView on iPhone, but working in Simulator

    - by Graeme
    Hi, I have a UITable View that displays an image in the left hand side of the table cell, and it works fine in the simulator. Only problem is, once I ran it on my device no images appear. It's just a blank white space. Have checked that images are added to resource folder for build (which they are) and that capitals etc. match (which they do). Any ideas? Thanks. Code to display images: cell.imageView.layer.masksToBounds = YES; cell.imageView.layer.cornerRadius = 5.0; UIImage *image = [UIImage imageNamed:[[dog types] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];; if ( image ) { cell.imageView.image = [image imageScaledToSize:CGSizeMake(50, 50)]; }

    Read the article

  • TwitPic Multiple image upload

    - by Tim Karen
    Has anybody experienced Timeout error with TwitPic API using ASIFormDataRequest when uploading multiple images? Status updates without images are fine. I was trying to upload the exact same 2 images. The first request went through fine, but the second one was timeout. It also happens when multiple images are uploaded, some went through, but some didn't. It's happening randomly and I have no idea how to debug it anymore.

    Read the article

  • Using kEAGLRenderingAPIOpenGLES2 causes bad access in glMatrixMode

    - by hyn
    I am trying to use the ES 2 API in my app but using kEAGLRenderingAPIOpenGLES2 causes bad access at glMatrixMode(). There is a similar question here but doesn't answer my question. If I use kEAGLRenderingAPIOpenGLES1 then everything is fine. I could reproduce the same problem with Apple's sample code. What can I do to make glMatrixMode() work in ES 2?

    Read the article

  • Change (not init) a UIBarButtonItem identifier programatically?

    - by Nebs
    In IB I can set the identifier of a UIBarButtonItem to 'play' which adds an image of a play button (right-pointing triangle). Is there a way to change this image programatically? I want to change it to 'pause' when the play button is pressed. I know you can initialize a UIBarButtonItem with an identifier but I've yet to find a way to change it after it's been initialized. Is this even possible? The only thing I can think of is to remove the old button and initialize a new one in its place, but this hardly seems efficient. Any thoughts?

    Read the article

  • Double title bar issue iPhone app

    - by Nick Brunch
    I have noticed that whenever a phone call comes in while my app is in use (Or I simulate in-call status bar using the simulator), and the phone call ends, I end up with a double status bar in my app. The status bar goes away if I click any other tab and come back to the original tab (my app has a UITTabBar in it). I have tried so many options that I am losing track now. The most I have read are to set your UIView's size to be flexible in interface builder but nothing seems to work. Please look at the screenshots. I am pasting a default view of the sizing options in interface builder but believe me I have tried every single configuration option there.

    Read the article

  • Listening to the iPhone mic with SCListener and playing music at the same time: how?

    - by Eamon Ford
    Hello, I am using Stephen Celis' SCListener class (for iPhone) to "listen" from the microphone, but I also need to be playing music at the same time using the MediaPlayer framework. However, when I start listening with SCListener, the music fades out and stops. I have set the kAudioSessionCategory_PlayAndRecord property on the audio session in SCListener, which should allow me to play audio and record audio at the same time, but as far as I can tell it has no effect. I'm confused, because according to other developers' results, this works just fine, but not for me. I'm thinking maybe the kAudioSessionCategory_PlayAndRecord property allows you to play sound and record if you're using the AVAudioPlayer framework or something to play the sound, but maybe not the MediaPlayer framework? This would be a problem for me because I need to play music from the user's iPod library, which, as far as I know is only possible to do using the MediaPlayer framework. Does anyone know how I can get around this problem? Thanks in advance!

    Read the article

  • Images in the project NOT adding to array - don't know why.

    - by Sam Jarman
    Hi there, I have to sets of images. Each set has 16 images. One set is called 0.png through to 15.png the other is a0.png through to a15.png. In my app, it loads each one dependent on a variable (which by logging, I have proved it works) here is the code [MemoryManager sharedMemoryManager]; NSLog(@"THEME: %@", [MemoryManager sharedMemoryManager].themeName); imageArray = [[NSMutableArray alloc] init]; if([MemoryManager sharedMemoryManager].themeName == @"hand"){ NSLog(@"Here 2"); [imageArray addObject:[UIImage imageNamed:@"0.png"]]; // [imageArray addObject:[UIImage imageNamed:@"1.png"]];//1 [imageArray addObject:[UIImage imageNamed:@"2.png"]];//2 [imageArray addObject:[UIImage imageNamed:@"3.png"]];//3 [imageArray addObject:[UIImage imageNamed:@"4.png"]];//4 [imageArray addObject:[UIImage imageNamed:@"5.png"]];//5 [imageArray addObject:[UIImage imageNamed:@"6.png"]];//6 [imageArray addObject:[UIImage imageNamed:@"7.png"]];//7 [imageArray addObject:[UIImage imageNamed:@"8.png"]];//8 [imageArray addObject:[UIImage imageNamed:@"9.png"]];//9 [imageArray addObject:[UIImage imageNamed:@"10.png"]];//10 [imageArray addObject:[UIImage imageNamed:@"11.png"]];//11 [imageArray addObject:[UIImage imageNamed:@"12.png"]];//12 [imageArray addObject:[UIImage imageNamed:@"13.png"]];//13 [imageArray addObject:[UIImage imageNamed:@"14.png"]];//14 [imageArray addObject:[UIImage imageNamed:@"15.png"]];//15 } if([MemoryManager sharedMemoryManager].themeName == @"letters"){ NSLog(@"Here 3"); //[imageArray removeAllObjects]; [imageArray addObject:[UIImage imageNamed:@"a0.png"]]; // [imageArray addObject:[UIImage imageNamed:@"a1.png"]];//1 [imageArray addObject:[UIImage imageNamed:@"a2.png"]];//2 [imageArray addObject:[UIImage imageNamed:@"a3.png"]];//3 [imageArray addObject:[UIImage imageNamed:@"a4.png"]];//4 [imageArray addObject:[UIImage imageNamed:@"a5.png"]];//5 [imageArray addObject:[UIImage imageNamed:@"a6.png"]];//6 [imageArray addObject:[UIImage imageNamed:@"a7.png"]];//7 [imageArray addObject:[UIImage imageNamed:@"a8.png"]];//8 [imageArray addObject:[UIImage imageNamed:@"a9.png"]];//9 [imageArray addObject:[UIImage imageNamed:@"a10.png"]];//10 [imageArray addObject:[UIImage imageNamed:@"a11.png"]];//11 [imageArray addObject:[UIImage imageNamed:@"a12.png"]];//12 [imageArray addObject:[UIImage imageNamed:@"a13.png"]];//13 [imageArray addObject:[UIImage imageNamed:@"a14.png"]];//14 [imageArray addObject:[UIImage imageNamed:@"a15.png"]];//15 NSLog(@"Here 4"); } The log says 2010-05-26 21:30:57.092 Memory[22155:207] Here 1 2010-05-26 21:30:57.093 Memory[22155:207] THEME: letters 2010-05-26 21:30:57.095 Memory[22155:207] Here 3 2010-05-26 21:30:57.109 Memory[22155:207] Here 4 The images are in the same folder the .xproj file is. They simply is just not working. Any ideas? Cheers

    Read the article

  • Split NSData objects into other NSData objects with a given size

    - by Cedric Vandendriessche
    I'm having an NSData object of approximately 1000kb big. Now I want to transfer this via bluetooth. This would be better if I have let's say 10 objects of 100kb. It comes to mind that I should use the -subdataWithRange: method of NSData. I haven't really worked with NSRange. Well I know how it works, but then to read from a given location with the length: 'to end of file'... I've no idea how to do that. Some code on how to split this into multiple 100kb NSData objects would really help me out here. (it probably involves the length method to see how many objects should be made..?) Thank you in advance.

    Read the article

  • How to display user location in mapkit?

    - by 4thSpace
    I'd like to display the blue pulsing dot for a user's location. I'm doing this: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{ //some other stuff here [self.mapView setShowsUserLocation:YES]; } But I eventually get -[MKUserLocation establishment]: unrecognized selector sent to instance 0x125e90 Should I be doing this some other way?

    Read the article

  • OrientationEventListener not working properly

    - by nixau
    Hi all, I need to handle orientation changes in my Android application. For this purpose I decided to use OrientationEventListener convenience class. But his callback method is given somewhat strange behavior. My application starts in the portrait mode and then eventually switches to the lanscape one. I have some custom code executing in the callback onOrientationChanged method that provides some additional UI handling logic - it has a few calls to findViewById. What is strange is that when switching back from landscape to portrait mode onOrientationChanged callback is called twice, and what's even worse - the second call is dealing with bad Context - findViewById method starts returning null. These calls are made right from the MainThread @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); listener = new OrientationListener(); } @Override protected void onResume() { super.onResume(); // enabling listening listener.enable(); } @Override protected void onPause() { super.onPause(); // disabling listening listener.disable(); } I've replicated the same behavior with a dummy Activity without any logic except for one that deals with orientation hadling. I initiate orientation switch from the Android 2.2 emulator by pressing Ctrl+F11 What could be wrong? Upd: Inner class that implements OrientationEventListener private class OrientationListener extends OrientationEventListener { public OrientationL() { super(getBaseContext()); } @Override public void onOrientationChanged(int orientation) { toString(); } } }

    Read the article

  • Start Learning Android

    - by Shrewd Demon
    hi, i am a beginner with Android. I want to learn more about this new revolution. Kindly help me with links that will help me learn creating applications for Android. Please share if you have some simple source-code sites with you. Also show me a forum having high activity with Android users... thank you !

    Read the article

  • moviePlayBackDidFinish: is not called in application.

    - by srikanth rongali
    In my application I have used these notifications when playing a video. But, The problem is the control of the program is not entering in to the first two methods(moviePreLoadDidFinish and moviePlayBackDidFinish). It is entering into last method. So, after the video is played and I pressed Done button in the video, I cannot touch any object in screen. I mean I used play button for video to play in a view. After the video played the play button is deactivated. - (void) moviePreloadDidFinish:(NSNotification*)notification { } // Notification called when the movie finished playing. - (void) moviePlayBackDidFinish:(NSNotification*)notification { } // Notification called when the movie scaling mode has changed. - (void) movieScalingModeDidChange:(NSNotification*)notification { } I could not get where I was wrong ? Thank You.

    Read the article

  • OpenGL ES 2.0 equivalent of glOrtho()?

    - by Zippo
    In my iphone app, I need to project 3d scene into the 2D coordinates of the screen for some calculations. My objects go through various rotations, translations and scaling. So I figured I need to multiply the vertices with ModelView matrix first, then I need to multiply it with the Orthogonal projection matrix. First of all am on the right track? I have the Model View Matrix, but need the projection matrix. Is there a glOrtho() equivalent in ES 2.0?

    Read the article

  • iPhone - strange error when testing on simulator

    - by lostInTransit
    Hi I was testing my app on the simulator when it crashed on clicking a button of a UIAlertView. I stopped debugging there, made some changes to the code and built the app again. Now when I run the application, I get this error in the console Couldn't register com.myApp.debug with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”. I tried removing the app from the simulator, doing a clean build but I still get this error when I try to run the app. Can someone please let me know what I should do to be able to run the app on my simulator again. Thanks.

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >