ios8

Why are my UISegmentControl segments highlighting in iOS 8 when I have set background images for all states?

自古美人都是妖i 提交于 2019-12-18 15:32:14
问题 In iOS 6/7, I have used UISegmentedControl with background images to create an effect like so: I accomplished this by setting the background image for the UISegmentedControl for each of standard states, like so: UIImage *segmentedControlBackgroundImage = [UIImage imageNamed:@"profileSegmentedControlBackground"]; UIImage *segmentedControlBackgroundSelectedImage = [UIImage imageNamed:@"profileSegmentedControlBackgroundSelected"]; [self.segmentedControl setBackgroundImage

NSMutableAttributedString's attribute NSStrikethroughStyleAttributeName doesn't work correctly in iOS8

青春壹個敷衍的年華 提交于 2019-12-18 13:27:53
问题 I have a mutable attributed string without NSStrikethroughStyleAttributeName attribute like this: NSMutableAttributedString *str1 = [[NSMutableAttributedString alloc] initWithString:@"aaaa" attributes:@{NSStrikethroughStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle]}]; and another mutable attributed string with NSStrikethroughStyleAttributeName attribute like this: NSMutableAttributedString *str2 = [[NSMutableAttributedString alloc] initWithString:@"bbbb"]; and a whole

How to resume JavaScript timer on iOS8 web app after screen unlock?

浪尽此生 提交于 2019-12-18 12:57:30
问题 On iOS8 this HTML5 web app does not resume the js timer after the screen is locked and then unlocked if the webapp was active AND launched from the homescreen icon. On iOS7 the timer would continue in this situation. I need the timer to continue after the screen is unlocked - any tips to achieve this? Note/ Please add the web app to the homescreen first using Safari's "add to home screen" via the sharing button. Running the page inside Safari does not cause the issue described above. <html>

How to support NSCalendar with both iOS 7 and 8?

戏子无情 提交于 2019-12-18 12:54:50
问题 iOS 8 introduced some new values for old methods. For instance, creating a calendar used to be like this: NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; Now, the calendar identifier has changed and I should create the object like so: NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; Thing is, the compiler warns me only in the first situation that NSGregorianCalendar is deprecated. However, The

UIModalPresentationPopover for iPhone 6 Plus in landscape doesn't display popover

一个人想着一个人 提交于 2019-12-18 12:45:40
问题 I want to always present a ViewController in a popover on all devices and all orientations. I tried to accomplish this by adopting the UIPopoverPresentationControllerDelegate and setting the sourceView and sourceRect . This works very well for all devices and orientations, except the iPhone 6 Plus in landscape. In that case the view controller slides up from the bottom of the screen in a form sheet. How can I prevent that so that it will always appear in a popover? override func

Xcode6:Embedded binary is not signed with the same certificate as the parent app

雨燕双飞 提交于 2019-12-18 12:44:54
问题 After I add Today App Extension Target,I become impossible to compile project. below is error: error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's. Embedded Binary Signing Certificate: iPhone Developer: (Developer name) (number) Parent App Signing Certificate: iPhone Developer: (Developer name) (number) but Embedded binary certificate and parent app's cerificate are the same. So I'm

Check full access for custom keyboard extension

倖福魔咒の 提交于 2019-12-18 12:42:39
问题 I need to check full access for custom keyboard extension. I found this link. How to check the "Allow Full Access" is enabled in iOS 8? It say we can check App group. I have app group called "group.TTT.TGroup". It share access between main app and custom keyboard. Then, I check like this. Problem is that I always have access to that (always has array or error = null). Is it because I am sharing same data? But, if my app use another app group and extension use other app group, I can't

iOS 8 action extension icon is blank on device (works in simulator)

对着背影说爱祢 提交于 2019-12-18 12:16:11
问题 Edit2: I've distilled the problem down to the simplest project I can. Here's the setup. I created a new single view app and immediately added a new Action extension target. I created a new icon set in the .xcassets file and added an iPad retina sized icon (I've tried filling in all the icons, the results are the same). I made sure to include Images.xcassets in the Copy Bundle Resources build phase: And then when running the app in the simulator everything works! Compiling to device however

How to search an Array containing struct elements in Swift?

拥有回忆 提交于 2019-12-18 12:10:58
问题 It's kind pretty straight forward to find an element in an array with type String, Int, etc. var States = ["CA", "FL", "MI"] var filteredStates = States.filter {$0 == "FL"} // returns false, true, false Now, I created a struct struct Candy{ let name:String } and then initialized it var candies = [Candy(name: "Chocolate"), Candy(name: "Lollipop"), Candy(name: "Caramel")] Can anyone please suggest the right way to find "Chocolate" in the array containing struct elements? I'm not able to

UIView not resizing when rotated with a CGAffineTransform under iOS8

不打扰是莪最后的温柔 提交于 2019-12-18 12:08:53
问题 I have a UIViewController that only rotates some of it subviews when the device is rotated. This works fine under iOS7 but breaks under iOS8. It appears that the UIView's bounds are adjusted by the transform under iOS8. This was unexpected. Here's some code: @interface VVViewController () @property (weak, nonatomic) IBOutlet UIView *pinnedControls; @property (nonatomic, strong) NSMutableArray *pinnedViews; @end @implementation VVViewController - (void)viewDidLoad { [super viewDidLoad]; self