ios7

Multi-peer connectivity without BrowserViewController UI

荒凉一梦 提交于 2019-12-11 13:34:45
问题 I am using Multi-peer connectivity framework and have tried Apple example it works fine, but I want to modify it and instead of using inbuilt browser view controller UI i want to do it with my own UI / code , is it possible to discover devices without the inbuilt UI ? Please help. 回答1: See my answer here. I think you'll find the answer there but the short of it is that it is possible. Here is a link to a post at NSHipster that will walk you through the work too. 来源: https://stackoverflow.com

Autolayout preventing 3-line label from having more than two lines

扶醉桌前 提交于 2019-12-11 13:29:20
问题 I am laying out a UICollectionViewCell in IB, and one of the UILabels I am adding is not behaving the way I would expect with autolayout. The desired behavior is: the label's width is at most 385px; the label's right edge stays at least 30px away from the edge of it's container; the label takes up as much vertical space as necessary to fit up to three lines of text. I have working constraints set up to handle the width (and padding). The problem is with the calculated frame height of label.

GPUImage Kuwahara filter on iPhone 4S

扶醉桌前 提交于 2019-12-11 13:28:46
问题 I'm using Brad Larson's GPUImage framework. However when I'm trying to apply kuwahara filter with filter radius 5.0f , I'm getting artifacts on an iPhone 4S. (works fine on higher performance devices) Source image size was 2048x2048px. By reading original developer's comments I understood that there's a kind of watchdog timer which fires when something takes too long to run on the GPU. So my question is , what is the maximum possible resolution for an iPhone 4S I can apply Kuwahara filter

What is the need to resize subviews programmatically when using storyboards?

不羁的心 提交于 2019-12-11 13:22:29
问题 I am well versed with custom views. Today I have started using storyboards & I am not able to convince myself on the usage of storyboard. Problem: - I have set up by View Controller in storyboard. - Running on simulator 4 inch, I am good to Go with the layouts of Views. - Running on simulator 3.5 inch, I am upset, as my view is partially visible. Here are screen shots. My SotryBaord (Look at the "Delete User" Button). Delete User button frame: Running on Simulator 4 inch Running on Simulator

UIModalTransitionStylePartialCurl not working on iOS 8

∥☆過路亽.° 提交于 2019-12-11 13:15:10
问题 I have the code that works absolutely fine with iOS7 and below versions. But with xcode6 and iOS8 UIModalTransitionStylePartialCurl is not working. page curl dismisses in fraction of second as view appears. MyViewController* opts = [[MyViewController alloc] initWithView:someView]; opts.modalPresentationStyle = UIModalPresentationFullScreen; opts.modalTransitionStyle = UIModalTransitionStylePartialCurl; [self presentViewController:opts animated:YES completion:nil]; [Edit] - I found that if

iOS7 UIImagePickerController cancel button disappear

夙愿已清 提交于 2019-12-11 13:12:57
问题 The Cancel button is miss?! How can I fix this? Thank you very much. if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) { if(buttonIndex == 1) { self.ctr = [[UIImagePickerController alloc] init]; self.ctr.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; self.ctr.delegate = self; self.ctr.allowsEditing = YES; [self presentModalViewController:self.ctr animated:YES]; } } 回答1: Just change the UIImagePickerController navigationBar

How to limit android devices according to CPU performance with unity3D

心不动则不痛 提交于 2019-12-11 13:10:20
问题 I have recently published my unity game on App Store. I Targeted iOS 7 to eliminate iPhone 3GS for performance reasons. Now i am willing to publish my game for android devices with unity but i am not sure how to restrict my game. which configuration should i use with min API level or device filter? My game uses about 100 % CPU with iPhone 4 and about 50% with iPad 4 retina. Any help would be appreciated. Thanks. 回答1: If you want to target higher-end android devices, first of all, try setting

Design for annotating UICollectionView selections with additional controls

故事扮演 提交于 2019-12-11 12:57:19
问题 Using UICollectionView and excellent help given on here on StackOverflow, I've been able to build a "Gantt Chart" style control for my iPhone: Cosmetics aside (I'm doing the functional right now, I've got a graphics designer on tap to look at colors and all that). Background aside, the spans were relatively straightforward to do with a custom UICollectionViewLayout subclass. Each span is an item . But I need to add some functionality, and am unsure how to proceed. Where I'm trying to go is

UIBarButtonItem setBackgroundImage not working anymore in iOS7 iPad

孤者浪人 提交于 2019-12-11 12:38:41
问题 I have this appearance related code that was working fine in iOS 5: -(void)customizeBackButton:(UIBarButtonItem*)backButtonItem {; [backButtonItem setBackgroundImage:[UIImage imageNamed:@"backbuttonitem"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; } This method is called within viewDidLoad in normal UIViewController . Backbutton is a connected IBOutlet of a UIBarButtonItem, placed in a UIToolbar, and I am correctly seeing it when debugging. The point is that I can change

How to implement a Best Score Today leaderboard using Game Center?

こ雲淡風輕ζ 提交于 2019-12-11 12:37:10
问题 I want to create a leaderboard in Game Center for the best scores submitted today, and I want it reset every day at midnight. It's not hard to just create a "most recent score" leaderboard and keep track of the score for the day in the app and submit it, however my concern is that users who do not launch the app the next day will have an old score which remains in the "best score today" board until they launch it. Is there any way to make scores expire, or only show the current scores for the