ios5

UITableView: custom header title view doesn't show

旧城冷巷雨未停 提交于 2019-12-24 03:23:36
问题 I want to display a table with custom header titles. The table view is attached to a controller class that implements the tableview delegate and data source protocols but is not a subclass of UIViewController because the table is a subview to be displayed above another tableview. some snippets of my code: The tableview is created programmatically: _myListView = [[UITableView alloc] initWithFrame:tableFrame style:UITableViewStyleGrouped]; [_myListView setDataSource:self.myListController]; [

Objective C - Make iVars hidden

霸气de小男生 提交于 2019-12-24 03:15:26
问题 Here's my question. Let's say I have a class called WebServiceBase.h. And I need to add a iVar in to that class called NSString *requestData. But I don't need to add that iVar in to the header file and make it visible to the external people. (If I'm distributing this as a class library) Also I need to be able to access this requestData iVar, within the other classes that is extended from the WebServiceBase.h. (These extended classes are written by me. Not from the external people) I tried

Facebook API SDK 3.0 “An error occurred with app”

半世苍凉 提交于 2019-12-24 03:12:36
问题 I am doing ios integration with facebook and I just added Facebook login. i am able to login with my facebook account, but my friend tested it, when he tries it, it gives him the error message that says "An error occured. Please try again later." However, when I tried to login myself with my own Facebook account, I was able to register successfully. So I'm not sure what's wrong. Can someone give any solution ? 回答1: i was facing the same error with my app, i found that "Sandbox Mode" flag is

Appearance Proxies & Layers

时间秒杀一切 提交于 2019-12-24 03:05:17
问题 Is it possible to use iOS 5 appearance proxies to refactor code that sets properties on layers? _button.layer.cornerRadius = 5.0f; _button.layer.borderWidth = 1.0f; _button.layer.borderColor = [[UIColor blackColor] CGColor]; _button.layer.masksToBounds = YES; 回答1: Nope.. Apple's says: To support appearance customization, a class must conform to the UIAppearanceContainer protocol and relevant accessor methods must be marked with UI_APPEARANCE_SELECTOR. http://developer.apple.com/library/ios/

Access CrashReporter files in app iOS 5 **ENTERPRISE APPLICATION**

冷暖自知 提交于 2019-12-24 02:58:11
问题 stop reading if your are going to say something along the lines of "blah blah private API usage will get rejected blah blah" This is for an enterprise app in iOS 5 i am trying to send current crashlogs to my server from the clients iPads. They have a management software but there is no way to get the crashlogs from it, just the console log which is not helpful in this instance. I have tried just reading the contents of the /var/logs/CrashReporter using NSError * error; NSArray *

Why does reloadRowsAtIndexPaths not work for iOS 5.0?

最后都变了- 提交于 2019-12-24 00:59:36
问题 SOLVED: See my answer (and possible explanation) below. I'm making an app that works on iOS 5.1 devices, but not on iOS 5.0 devices. Here is the trouble code that works on 5.1 but NOT on 5.0: - (void) expandIndexPath: (NSIndexPath *) indexPath afterDelay: (BOOL) delay { NSIndexPath *oldSelectedIndexPath = [NSIndexPath indexPathForRow:self.mySelectedIndex inSection:0]; self.mySelectedIndex= indexPath.row; // [self.myTableView beginUpdates]; [self.myTableView reloadRowsAtIndexPaths:[NSArray

Memory leak for MFMailcomposeviewcontroller on send mail

為{幸葍}努か 提交于 2019-12-24 00:58:06
问题 My app used MFMailcomposeviewcontroller for send mail.I used instrument to check leak,when i press send button in mail compose got more leaks in foundation and messageUI framework and attached screen shot of instrument leak.can any one help me to solve it. 回答1: Here is an absolutely amazing tutorial on debugging memory leaks in Xcode with Instruments. It will teach you to interpret that display for yourself. 来源: https://stackoverflow.com/questions/14907372/memory-leak-for

Set UITableView BackgroundColor Universally with UIAppearance

穿精又带淫゛_ 提交于 2019-12-24 00:53:50
问题 I'm trying to universally change the background color for my table views. It is a combination UINavigationController and TabBarController app. I've tried putting the following in AppDelegate applicationDidFinishLaunchingWithOptions [[[UITableView appearance] backgroundView] setBackgroundColor:[UIColor redColor]]; [[UITableView appearance] setBackgroundColor:[UIColor redColor]]; [[UITableView appearanceWhenContainedIn:[UINavigationController class], nil] setBackgroundColor:[UIColor greenColor]

How to play a video url from server in an iPhone app

你离开我真会死。 提交于 2019-12-24 00:35:01
问题 Actually, I get a url from server by using XMLParser . I want to play this video url in my app. Now I used `MPMoviePlayerController, but its not working. Please help! XMLParser.m -(id) loadXMLByURL:(NSString *)urlString { videoNames =[[NSMutableArray alloc]init]; videos = [[NSMutableArray alloc] init]; NSURL *url = [NSURL URLWithString:urlString]; NSData *data = [[NSData alloc] initWithContentsOfURL:url]; parser = [[NSXMLParser alloc] initWithData:data]; parser.delegate = self; [parser parse]

Apple requirements for programmatic download

ε祈祈猫儿з 提交于 2019-12-24 00:22:40
问题 My application is downloading data from web such as JSON, pictures, e.t.c. When installed the amount of data is supposed to be more than 50mb. It will be expensive for those who use 3G connection. I guess my application needs to find out what is the type of the internet connection, I was told that Apple has it's own requirements for downloads, but I couldn't find any useful information from internet. Besides that my app gives an option to download wallpaper to pictures gallery, and I guess I