ios4

Duplicate protocol definition

心不动则不痛 提交于 2020-01-07 06:14:12
问题 Getting warning message that Duplicate protocol definition of ModalViewDelegate is ignored Defined protocol in modalviewcontroller.h file @protocol ModalViewDelegate; -(void)dismissView:(id)sender; @interface Modalviewcontroller : UIViewController { id<ModalViewDelegate>delegate; } @property (nonatomic, assign) id<ModalViewDelegate>delegate; @end In the Modalviewcontroller.m file synthesize delegate In Mainviewcontroller.h file @protocol ModalViewDelegate -(void)didDismissModal:(id)sender;

Detecting call duration in my App

亡梦爱人 提交于 2020-01-07 04:35:09
问题 I have app and it is running and at that time the call is comming and after sometime i cancel that call can i find the duration of Call. 回答1: You can look at CTCoreTelephony framework provided in iPhone sdk. It provides classes and methods to access call and carrier related information. 来源: https://stackoverflow.com/questions/7021417/detecting-call-duration-in-my-app

About dequeueReusableCellWithIdentifier:

蓝咒 提交于 2020-01-07 04:25:29
问题 Case 1: create UITableViewCell with initWithStyle:reuseIdentifier: Case 2: create UITableViewCell with [[NSBundle mainBundle] loadNibNamed:@"MyCell" owner:self options:nil]; Case 1 will create reusable cell combined together with specific identifier,which will be pushed into the reusable queue. Case 2 will create one cell from nib file, but can not be put into the reusable queue as case 1. Question is any solution for case 2 to make the cell be reusable ? 回答1: In the XIB there is a setting

iphone: How do I make my app support two or more languages?

流过昼夜 提交于 2020-01-06 20:56:09
问题 I have my app with english version. I want it to run with french text also. What steps I need to perform? or what API or extra code I will need? Any examples or tutorial will help me more. 回答1: You need to add localizable strings for all the languages. And also you need to add the .lproj along with the localized file for each language you want to provide the support for. Hope this helps you. EDIT: I have some of these links useful for you. http://www.icanlocalize.com/site/tutorials/iphone

How to release a NSThread is there any particular process to release?

谁都会走 提交于 2020-01-06 20:54:23
问题 In my code for search controller I am using NSthread. For every character we enter in the search bar a new thread is created very next the thread is started. How do we release these NSThreads which are causing memory leaks? Here is where my NSThreads are created: if (searchString.length > 1) { self.searchThread = [[[NSThread alloc] initWithTarget:self selector:@selector(filterContentForSearchTextInBackgroundThread:) object:searchString] autorelease]; [self.searchThread start]; } 回答1: Answer:

How to show selected date on button using datepicker?

北战南征 提交于 2020-01-06 20:07:53
问题 when i click on my button am able to show date picker sucessfully.But when i am selecting date from the date picker I am unble to show the selected date on UIbutton . plz help me Here is my code: -(IBAction)btnDateClicked:(id)sender { UIActionSheet *actionSheet1 = [[UIActionSheet alloc] initWithTitle:nil delegate:nil cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; [actionSheet1 setActionSheetStyle:UIActionSheetStyleBlackTranslucent]; CGRect pickerFrame = CGRectMake(0,

Sending MMS in iphone programmatically

我的梦境 提交于 2020-01-06 19:48:21
问题 I have tried searching almost all the blog sites. I need to send an MMS programatically. As far as my research on this I came to know that its not possible for IOS < 3. Is there any way i can use the messageUI kit fot sending MMS for IOS 4. Please let me know the possible ways. Thanks in advance!!! 回答1: You cannot send MMS right now. MFMessageComposeViewController only allow SMS messages on iOS 4 only. 回答2: iOS prevents SMS or MMS messages from being sent programmatically. You can compose the

Problem while playing sound using AVAudioPlayer?

纵然是瞬间 提交于 2020-01-06 19:39:32
问题 In my app, I am playing sound from library directory. Here sounds are stored in different folders with different naming conventions. For example, Folders like : Test , Test 2 Now when I try to play sound from Test , it plays sound. But when I try to play sound from Test 2 , It is not playing any sound. I am using following code for playing sound : recordFile : "/Users/taxsmart2/Library/Application Support/iPhone Simulator/4.3/Applications/E2F2C422-605A-4EC7-A40A-7429A966351C/Library/List13

iPhone : How to create expanadable table view?

左心房为你撑大大i 提交于 2020-01-06 19:34:41
问题 I want to create expandable table view. I found one link which is same as I want. But I want to create my own table view (Dont want to implements this github code). How do I achieve this type of functionality ? 回答1: See this nice tutorial: Table View Animations and Gestures Demonstrates how you can use animated updates to open and close sections of a table view for viewing, where each section represents a play, and each row contains a quotation from the play. It also uses gesture recognizers

iPhone : How to create expanadable table view?

会有一股神秘感。 提交于 2020-01-06 19:34:07
问题 I want to create expandable table view. I found one link which is same as I want. But I want to create my own table view (Dont want to implements this github code). How do I achieve this type of functionality ? 回答1: See this nice tutorial: Table View Animations and Gestures Demonstrates how you can use animated updates to open and close sections of a table view for viewing, where each section represents a play, and each row contains a quotation from the play. It also uses gesture recognizers