iphone-sdk-3.0

How do I set the firstresponder?

不羁岁月 提交于 2019-12-03 22:42:48
I have a view built through IB, there's a text view and and button on it. When the view shows up I would like to have the keyboard to be already displayed. I tried to set the first responder in the didViewLoad but that didn't work. I do have an IBOutlet that is connected to the textView and related accessor. Looks like you may have accidentally misspelled the method name didViewLoad instead of viewDidLoad . All you should need there (assuming your IBOutlet is connected in IB) is the following: [textView becomeFirstResponder]; I know this is tagged as cocoa-touch but this is highly ranked in

iPhone: Can access files in documents directory in Simulator, but not device

眉间皱痕 提交于 2019-12-03 21:59:03
I'm writing an app that copies some contents of the bundle into the applications Document's directory, mainly images and media. I then access this media throughout the app from the Document's directory. This works totally fine in the Simulator, but not on the device. The assets just come up as null. I've done NSLog's and the paths to the files look correct, and I've confirmed that the files exist in the directory by dumping a file listing in the console. Any ideas? Thank you! EDIT Here's the code that copies to the Document's directory NSString *pathToPublicationDirectory = [NSString

what is FFmpeg?

前提是你 提交于 2019-12-03 21:56:13
I am using the LINK to take frame from video ..but it says to create a commercial project that decodes H264 video, we have to make sure that we get a license from MPEG LA. Why should we get license?some tutorials say that we have to give complete source code to LGPL , if we integrate statically FFMPEG.what is mean by statically? what is the other option?can we submit our App to Appstore(for storing video streams in server) without getting license from LGPL?i am getting confused? any help please? There are multiple issues going on; the first is your legal right to use the FFMpeg code

Unable to add contact in group using ABGroupAddMember in iphone?

橙三吉。 提交于 2019-12-03 21:56:04
I am using the following code but still its not able to add contact information in group and one more thing it always use to create new group. i also want to check that exisiting gruop is avaialble or not !!!! Unable to add contact in group !! ABRecordRef group = ABGroupCreate(); //create a group ABRecordSetValue(group, kABGroupNameProperty,@"My Group", &error); // set group's name ABGroupAddMember(group, person, &error); // add the person to the group ABAddressBookAddRecord(addressBook, group, &error); // add the group ABAddressBookSave(addressBook, nil); //save the record Jhaliya Please find

how to display twitter feeds in iphone sdk

▼魔方 西西 提交于 2019-12-03 21:30:56
how to display twitter feeds of a specific user account in iphone sdk? you can fetch tweets of specific user from below link: https://api.twitter.com/1/statuses/user_timeline.rss?screen_name= username &count=25&page=1 and use any parser like NSXMLParser to parse the above feed. Let me know if you need any more details. This is very generic question. However for starters you can do the following Authenticate your app using Oauth Check out the APIs to fetch feeds from the twitter api site . You can create custom widgets to display or use uitableview to add the data. 来源: https://stackoverflow.com

Custom font in iPhone

﹥>﹥吖頭↗ 提交于 2019-12-03 21:05:53
问题 I'm new in iphone themes develop, and i want to know how to use custom TTF or OTF fonts on iphone, like one font type for phone pad, other for messages, etc... Can help me? 回答1: Yes, you can easily use custom TTF fonts in your application. All you need to do is to add the font as a resource and set a key in your Info.plist. See also this step-by-step guide. 来源: https://stackoverflow.com/questions/6220160/custom-font-in-iphone

Core Data and UITabBar Controller - help?

人走茶凉 提交于 2019-12-03 20:29:42
So I have a Project with a UITabBarController and a few Navigation Controllers, and I am trying to implement Core Data. Its just not working. I have a bit of a weird setup: UITabBarController -> Navigation Controller -> Table View Controller I have copied all of the Core Data code and added an entity with an attribute ('Event' and 'name' - just like the tutorials). I keep getting the error: erminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'Event'' The error only occurs when I switch to

How to open UITextView web links in a UIWebView instead of Safari?

半腔热情 提交于 2019-12-03 18:49:47
问题 I'm developing and iPhone 3.0 application. And I'm trying to open web links in a UITextView into a UIWebView instead of Safari. But still no luck. The UITextView is not editable, and it perfectly detects web links and open them in Safari. How to avoid that? How to grab that url so i can use with my own UIWebView ? 回答1: The simplest way is to override the webView:decidePolicyForNavigationAction:request:frame:decisionListener: method on UITextView like so: @interface UITextView (Override) @end

NSString to NSurl

独自空忆成欢 提交于 2019-12-03 18:40:11
问题 having trouble getting NSSTRING to convert to NSURL, item.image, holds the url for an image that im getting through xml NSString *urlString = [NSString stringWithFormat:@"%@", item.image]; NSURL *url = [NSURL URLWithString:urlString]; NSLog(@"string> %@ ", urlString); NSLog(@"url> %@ ", url); 2011-06-23 11:18:49.610 Test[10126:207] string> http://www.harlemfur.com/images/Dog_Olive.jpg 2011-06-23 11:18:49.611 Test[10126:207] url> (null) also if i try : NSString *urlString = [NSString

UIScrollView shifts below navigation and status bar

核能气质少年 提交于 2019-12-03 17:28:21
I have view which contains a scrollView. When the view shows up the image appears in full screen (320x480) hiding the status and navigation bar. When I tap the screens - status and navigation bar appears on the screen. But this thing shifts the UIScrollView below the the navigation bar. I want the status and nav bar to show over my scroll view. Like it happens in the photos app. On tapping the image the status and nav bar shows over the scrollView. Below is how I am positioning the view //What I have done in viewDidLoad [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];