ios7

iOS6/7 stop sound going to background using web audio API

三世轮回 提交于 2019-12-22 13:32:49
问题 There are different solutions for the issue when you go to the background in the iPhone or iPad and the sound continuous playing, the most of them for the HMTL5 audio tag, but are not relevant if you are using Web Audio API because there are not an event like "timeupdate" and is a different concept of course. The Page Visibility API works in iOS7 only if you change of tab, but doesn't if you go to the background, in iOS6 not at all. Someone knows any way to stop/mute a sound using Web Audio

How to change the color of unselected tab bar items in iOS 7?

寵の児 提交于 2019-12-22 12:49:00
问题 Im trying to change the color of the unselected images in the tab bar, by default they are changed to gray, even if the image is another color. I already search this, but the answers are only for iOS 6 or below. 回答1: This drove me mad just recently so I wrote my own class to handle it that works with every version of iOS I've tried it on ;) Its really easy to extend to do whatever you want it to do too! GozTabBar.h: #import <UIKit/UIKit.h> #import "GozTabBarItem.h" @protocol GozTabBarDelegate

In iOS7, why selected cell's background color is always gray?

半城伤御伤魂 提交于 2019-12-22 11:08:14
问题 set cell.selectionStyle = UITableViewCellSelectionStyleBlue , or even manually set Blue in storyboard, but neither of them works. if using setSelectedBackgroundView: , it may work. But I really want to know why method of `[cell setSelectionStyle:] not work any more in iOS 7? Is it deprecated in iOS 7? If so, why no any waring in Xcode when typing? 回答1: The method is not deprecated, and it still works—try setting a cell’s selectionStyle to UITableViewCellSelectionStyleNone , for instance. In

Fill SKShapeNode with pattern image

梦想与她 提交于 2019-12-22 11:05:15
问题 I'm trying to fill a SKShapeNode with an Image/pattern but I'm still unsuccessfull. Can you help me solving this or giving me an alternative? I want to create a collidable custom shape (from any SpriteKit kind) filled with a pattern image. I've tried the following: UIBezierPath *path = [[UIBezierPath alloc] init]; [path addArcWithCenter:CGPointMake(0.0, 0.0) radius:50.0 startAngle:0.0 endAngle:(M_PI*2.0) clockwise:YES]; SKShapeNode *shape = [[SKShapeNode alloc] init]; UIImage *patternImg =

Forward variadic arguments for a UIAlertView

ぃ、小莉子 提交于 2019-12-22 10:44:10
问题 I'm trying to set up a very simple UIAlertView with a text edit, an Ok and a cancel button, and I want to disable the Ok button based on the content of the text edit. To be able to retain the delegate so that he doesn't go away before the alert view (and thus cause a crash as soon as the user does something with the alert view), I've subclassed it. Now, I want to be able to forward the otherButtonTitles argument from my init method to the UIAlertView init method, but for some reasons, simply

How to Save Data When Using One ManagedObjectContext and PersistentStoreCoordinator with Two Stores

瘦欲@ 提交于 2019-12-22 10:35:50
问题 PROBLEM STATEMENT When attempting to save a record to a read/write store that is one of two SQLite stores assigned to the same PersistentStoreCoordinator, my iPhone app crashes. One obvious issue when saving a record is the PersistentStoreCoordinator does not know in which Store to save the data (only because I don't know how to make this happen). First I will provide the big picture to make sure my approach is sound. Then I will supply the implementation details. BACKGROUND This is a

SimplePing Apple Delegates not firing

帅比萌擦擦* 提交于 2019-12-22 10:15:07
问题 Following issue: I implemeted a Ping Object: @interface PingTest : NSObject <SimplePingDelegate> @property (strong, nonatomic) SimplePing* ping; SimplePing i got from Apple: https://developer.apple.com/library/mac/samplecode/SimplePing/Introduction/Intro.html Now i am trying to send a Ping like this: @synthesize ping; ping = [SimplePing simplePingWithHostName:PING_SERVER]; ping.delegate = self; [ping start]; #pragma mark - SimplePingDelegates - (void)simplePing:(SimplePing *)pinger

Hide TabBar in iOS 6

 ̄綄美尐妖づ 提交于 2019-12-22 09:46:49
问题 I want to Hide my TabBar in iOS 6 , when i wrote the code which is given below it works in iOS 7 but it shows black line in iOS 6 self.tabBarController.tabBar.hidden = YES; Here is snapshot for iOS 6 : 回答1: Try with below code May be this will help you... - (void)hideTabBar:(UITabBarController *) tabbarcontroller { for(UIView *view in tabbarcontroller.view.subviews) { if([view isKindOfClass:[UITabBar class]]) { if([UIScreen mainScreen].bounds.size.height==568) { [view setFrame:CGRectMake(view

Get UDID from beta testers iOS 7

若如初见. 提交于 2019-12-22 09:46:23
问题 I am deploying a test version of my app over the air to my beta testers. Before iOS 7, I could get their UDID by having them install an app like UDID Pro and having them email it to me. How do I get the UDID from my beta testers if they have iOS 7, so I can set up the provisioning profiles for the Ad Hoc distribution of my app? 回答1: Getting UDID programmatically will not work from iOS7.0 and upwards, since Apple apparently has moved it to "Private API" space for security reasons. However, you

Limit application capabilities in IOS to only work with Cell/WiFi data.

拜拜、爱过 提交于 2019-12-22 09:45:01
问题 I have searched all over StackOverFlow but did not find any answer on how to use Required Device Capabilities or UIRequiresPersistentWiFi . How do I set values in my application such that the app only works on cellular data/WiFi in the iPhone? Currently I have set the string WiFi property in the Required Device Capabilities Array according to iOSDeviceCompatibility. Is this the correct approach or should I set UIRequiresPersistentWiFi BOOL to YES ? 回答1: Based on the documentation, setting