iphone

iPhone toggleEdit - disable delete?

When I execute toggleEdit, a red button with a white line in the middle shows up on the left (to enable delete) and a blue button with a white arrow shows up on the right of each cell in my UITable: -(IBAction)toggleEdit:(id)sender { [self.table setEditing:!self.table.editing animated:YES]; } The blue button on the right shows ...

Best setting for record sound

What's the best settings for the recorder for recording voice? What should i replace with '?' in below code? recordSetting = [[NSMutableDictionary alloc] init]; [recordSetting setValue :[NSNumber numberWithInt:?] forKey:AVFormatIDKey]; [recordSetting setValue:[NSNumber numberWithFloat:?] forKey:AVSampleRateKey]; [recordSetting setValu...

Hosting a web service for an iPhone App

I need to write a fairly simple Delivery Tracking application. The device needs to know information about the 'matters' such as status (delivered/awaiting delivery), type (for delivery/for pickup), address, payment accepted etc. The iPhone part of the app seems very simple but in terms of hosting some kind of web service is the part I ...

iphone - locating incompatible code

I have a code with two targets that uses functions specific to iOS 4 and others compatible with 3.0+. I would like to make a final revision on the code to see if everything is fine. In other words, to see if there's no function meant for iOS4 being called when compiling for iOS 3.x target. Is there a way to list, during compilation, an...

iphone - adding stuff to a class method

I have a class named myClass. This class has TouchesMoved and TouchesBegan defined. This class is used by 3 other classes. But I need to add more code to each of these classes, to the same TouchesMoved and TouchesBegan methods, without overriding the code that is already on its class. I mean, if I add a TouchesBegan method to one of the...

Label text not initialising in new view iphone

DetailViewController.m Code: - (void)viewDidLoad { [super viewDidLoad]; NSString *navTitle = self.navigationItem.title; NSString *stalklabel = self.labelforurl.text; NSLog(@"%@", stalklabel); NSURL *address = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.twostepmedia.co.uk/json.php?q=%@",stalklabel...

Keyboard eats my Top Line of text in UITextView !

I met a really strange problem while using UITextView, I try to use "GrowStyle" of UITextView, wire up the frame with contentSize, turn off the .scrollEnabled, Build & Run: but when click the bottom of the screen, the keyboard showing up, the UITextView moves up a short distance, and its Top lines disappear, here is the code: - (void)v...

[iPhone] MPMoviePlayerViewController not rotating in landscape with tabbar

Hi, I display a video using MPMoviePlayerViewController in a tabbar application, the video plays fine in portrait mode but doesn't rotate in landscape mode. The same code works fine in another project without the tabbar. I tried to force the autoresizingmask to flexibleWidth and flexibleHeight without success. If i return YES in the ...

How can I load firmware dependent NIBS ?

Here is my question : I have an app running smoothly on iOS 3.0 I've been working a long time to port it to 4.0 and to include the new features. I added iAds using Interface Builder. I know that I have to define it programmatically to still support 3.0 devices. I weak linked the framework. But the app crashes when loading the NIB. I...

Push Notification restrictions

Hi all. Is there any limits/restrictions about amount of notifications sent to the APNS in time range ? For example - can I send 100,000 messages for 100,000 devices (one message for one device) in one hour to notify them about new content available to purchase via in-app purchases ? Found nothing about any restrictions in the manual. ...

Where's +alloc defined?

Hi all, This may be a silly question. I need to know where is the +alloc method is defined for any Objective-C class? If it is a class method in NSObject how it is inherited? Because class methods cant be inherited. Thanks. ...

Editable UIWebView in iPhone

Hi I have seen some write about making a UIWebView editable. I would like to be able to compose a message containing both text and images the WYSIWYG way, and I thought that I might do it with a UIWebView. Is this a good solution and how do I do this? I have searched the web for examples, but found none. Thank you ...

Text messaging on the iPhone - accessible from the SDK?

Is there an API in the iOS SDK that deals with text messaging? ...

How to customize ShareKit actionsheet?

I am using ShareKit (www.getsharekit.com) to share my URL's to Twitter and Facebook. I want to be able to remove all of the additional social network it points to, but am not sure where to edit? ...

Is it possible to get a 16-bit depth buffer on the iPhone?

Hi! We're making a game using cocos2d but are having problems with the depth buffer. I'm trying to setup a 16-bit depth buffer on the iPhone but so far I only get 24-bit depth. The reason I want 16-bit depth buffer is: A: I don't need the precision of 24-bit. B: I'm hoping it will be faster. This is how I set the depth format in...

AVMutableCompositionTrack - insertTimeRange - insertEmptyTimeRange issue

Hello there, I have a strange problem: I want to generate a new sound file out of two soundfiles and silence. sound1: 2 seconds long + silence: 2 seconds silence + sound2: 2 seconds long When I try the code below, I get a 6 seconds long soundfile with all the parts, but in a different order! The order is: sound1, sound2, silence I am...

Editing a model in Apple's Settings style

Hi there, I woud like to implement some editing mechanism for an iPhone application, that is I want the user to be able to edit an instance of my model. The model contains two types of data: The first is just an NSString where the user can write virtually anything he likes. The second one is a selection where he is able to pick one from...

iOS: How to measure passed time, independent of clock and time zone changes?

In order to measure the time duration while my app is running, as well as the time that passed while my app was idle in the background, I need a reference clock that is not altered by the user changing the Time+Date of his calendar clock. I can not rely on NSDate because that can be changed by the user while my app is in the background ...

Image path folder

Hi at all, I have a problem, I put into my app a folder (not a group, then folder blue) where I put some image. I read from database an html text that was display on a webviewpage. The problem is when I try to display an image with a <img src="file:///folder/subfolder/image.png"> the image wasn't display. Until I used a group (using ...

Limiting number of simultaneous sounds in CocosDenshion/Cocos2D

Hi, I'm building a game which will play a handfull of sounds all the time (rockets, rocket impacts etc). After a mere moment this turns into a real mess and i figured i need to limit the number of sounds. Problem is i don't want to decrease the number of channels of something because then one type of sound could "hog" the channels and ot...