ios6

Access the UIPageControl created by iOS6 UIPageViewController?

强颜欢笑 提交于 2020-01-11 05:04:10
问题 I'm using a UIPageViewController with Navigation set to Horizontal, Transition Style set to Scroll (in InterfaceBuilder), and no spine. Which gives me a lovely UIPageControl integrated. Now I want to be able to toggle whether it's displaying (because there's artwork underneath it). I've tried setting presentationCountForPageViewController and presentationIndexForPageViewController to return 0 when the UIPageControl is supposed to be hidden, but those methods aren't being called when I want.

UIRefreshControl not showing spiny when calling beginRefreshing and contentOffset is 0 [duplicate]

邮差的信 提交于 2020-01-11 00:44:07
问题 This question already has answers here : UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController (14 answers) Closed 6 years ago . I am not able to see the loading spinner when calling beginRefreshing [self.refreshControl beginRefreshing]; My UITableViewController subclass uses a UIRefreshControl // refresh UIRefreshControl * refreshControl = [UIRefreshControl new]; [refreshControl addTarget:self action:@selector(refreshTableView)

Compose UIActivityTypeMessage with UIImage

我怕爱的太早我们不能终老 提交于 2020-01-10 10:34:11
问题 Was wandering if anyone can offer some insight. For the life of me I can't figure out how to send a UIImage with UIActivityTypeMessage all though some say it is possible. The docs say: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIActivity_Class/Reference/Reference.html UIActivityTypeMessage The object posts the provided content to the Messages app. When using this service, you can provide NSString and NSAttributedString objects as data for the activity items. You

Facebook in iOS6.0 use SLRequest to upload a photo failed anyway

天大地大妈咪最大 提交于 2020-01-10 09:04:14
问题 Here Comes my Objc code: ACAccountStore *facebookaccount = [[ACAccountStore alloc] init]; ACAccountType *facebookaccountType = [facebookaccount accountTypeWithAccountTypeIdentifier: ACAccountTypeIdentifierFacebook]; // Specify App ID and permissions NSDictionary *options = @{ ACFacebookAppIdKey: @"1234567899876543", ACFacebookPermissionsKey: @[@"publish_stream"], ACFacebookAudienceKey: ACFacebookAudienceFriends }; [facebookaccount requestAccessToAccountsWithType:facebookaccountType options

How to send email,sms notification from iPhone to Bluetooth LE device?

走远了吗. 提交于 2020-01-10 05:37:08
问题 what services/profiles will i have to use to send email,sms notification from iphone to a bluetooth LE device.Is there any sample code??? 回答1: ANCS would be the answer in iOS 7, but I am not sure if the watch device can get the call number, content of message etc. That is sure that notification will be sent via ANCS. 来源: https://stackoverflow.com/questions/12197503/how-to-send-email-sms-notification-from-iphone-to-bluetooth-le-device

Multiple UIInterfaceOrientations app with iOS 6

坚强是说给别人听的谎言 提交于 2020-01-10 03:13:26
问题 I'm having a bad time trying to set the new UIInterfaceOrientations from iOS 6. Resuming my app: My app have a bunch of views; Almost every view should be shown on Portrait orientation; 2 of my views (the ones that play videos with MPMoviePlayerViewController ) should rotate to left, right and portrait orientations. My original idea was to set the app supported orientation to Portrait and than change (don't know how) the supported orientation from the video player views. What would be the

iOS6 Safari orientation change bug?

依然范特西╮ 提交于 2020-01-10 02:33:28
问题 I'm having an rare behavior in Safari and iOS6. When changing from landscape to portrait, the viewport is resized, but it seems that is no correctly positioned horizontally. It's displaced exactly 128px to left. I'm able to reproduce this behavior with an iPad3 in iOS6 going to www.google.com If you change the display property of the html like this: document.querySelector("html").style.display = "none" document.querySelector("html").style.display = "block" the viewport returns to origin and

How to make a uitableview in interface builder compatible with a 4 inch iPhone

与世无争的帅哥 提交于 2020-01-09 09:37:21
问题 How do I make a uitableview in interface builder compatible with 4 inch iphone5, and the older iPhone 4/4s? There are three options in Xcode 4.5: Freeform Retina 3.5 full screen Retina 4 full screen If I chose Retina 4, then in the 3.5 inch phone it crosses/overflows the screen border Using code, I can set the frame accordingly, but then what is the use of using interface builder? How should one do it using Interface Builder? EDIT My question is for iphone 5 retina 4 inch screen. When

In iOS6 how to get the IP address

吃可爱长大的小学妹 提交于 2020-01-07 13:37:09
问题 I use the following code. It works fine on iOS 5, but in iOS 6 I didn't get the IP address. #import <ifaddrs.h> #import <arpa/inet.h> -(NSString *)getIPAddress { NSString *address = @"error"; struct ifaddrs *interfaces = NULL; struct ifaddrs *temp_addr = NULL; int success = 0; // retrieve the current interfaces - returns 0 on success success = getifaddrs(&interfaces); if (success == 0) { // Loop through linked list of interfaces temp_addr = interfaces; while(temp_addr != NULL) { if(temp_addr-

iOS6 Sort JSON objects

为君一笑 提交于 2020-01-07 05:44:04
问题 In my json file I have a title , subtitle , and url . I sort the title to set the items alphabetically, but the url isn't sorted with the title and I don't know why. This is what i've done: NSDictionary *allDataDictionary = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil]; NSArray *arrayOfItems = [allDataDictionary objectForKey:@"items"]; for (NSDictionary *diction in arrayOfItems) { NSString *titles = [diction objectForKey:@"title"]; NSString