ios7.1

iOS Core Bluetooth : Getting API MISUSE Warning

可紊 提交于 2019-12-18 13:54:10
问题 I am writing a test app in iOS 7 with the Core Bluetooth API. When I am testing the application I found that I am getting the following warning message: TestBluetooth[626:60b] CoreBluetooth[API MISUSE] can only accept commands while in the powered on state Later I debugged app and found that, warning is coming from the following line of code: [manager scanForPeripheralsWithServices:array options:scanOptions]; So can anyone please tell me why I am getting this message in the console? There are

Detect ring/silent switch position change

谁说我不能喝 提交于 2019-12-18 13:01:48
问题 I'm working on an app for which I would like to: respect the ring/silent switch when playing audio, and display an icon indicating that sound is muted when the ring/silent switch is set to silent. Requirement 1 is easy: I'm using AVAudioSessionSoloAmbient as my app's audio session category, so that my audio session will mute itself when the ring/silent switch is off. Requirement 2 seems considerably harder, because I need some sort of callback, notification, or KVO that will allow me to

ios crash EXC_BAD_ACCESS KERN_INVALID_ADDRESS

耗尽温柔 提交于 2019-12-18 10:58:34
问题 MyApp works good in 98% of the time, But sometimes it shows a crash. And its so random. The crash report shows the following. Thread : Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x3b1ae626 objc_msgSend + 5 1 Foundation 0x310e2381 _netServiceMonitorCallBack + 104 2 CFNetwork 0x302ea3b5 _QueryRecordReply(_DNSServiceRef_t*, unsigned int, unsigned int, int, char const*, unsigned short, unsigned short, unsigned short, void const*, unsigned int, void*) + 324 3 libsystem_dnssd.dylib 0x3b7289d9

Flipped x-scale breaks collision handling (SpriteKit 7.1)

二次信任 提交于 2019-12-18 03:38:10
问题 I use SKNode's xScale property to flip my sprites horizontally. Now, after updating iOS to version 7.1 horizontal flip causes my objects to sink inside the ground. (See animation below). The problem occurs only with xScale property. Vertical flips work fine. // Init { SKSpriteNode* ground = [SKSpriteNode spriteNodeWithColor:[UIColor blackColor] size:CGSizeMake(winSize.width, 150)]; ground.position = CGPointMake(winSize.width/2, ground.size.height/2); ground.physicsBody = [SKPhysicsBody

Change the height of UILabel dynamically based on content

北战南征 提交于 2019-12-17 16:31:48
问题 I have a UILabel as subview of UIButton and I am passing the value from another view and populating in UILabel . Now, I want that UILabel must change its height based on the content.If text is "Hello" it must be in 1 line but if text is " my text is too long to fit in the label", it must change its size. I have used [self.addressLabel sizeToFit]; But for this i need to leave empty space below UILabel. Simply what I want is that when text strength increases,size of UILabel and UIView must

iOS 7.1 UITextView still not scrolling to cursor/caret after new line

懵懂的女人 提交于 2019-12-17 15:33:51
问题 Since iOS 7, a UITextView does not scroll automatically to the cursor as the user types text that flows to a new line. This issue is well documented on SO and elsewhere. For me, the issue is still present in iOS 7.1. What am I doing wrong? I installed Xcode 5.1 and targeted iOS 7.1. I'm using Auto Layout. Here's how I position the text view's content above the keyboard: - (void)keyboardUp:(NSNotification *)notification { NSDictionary *info = [notification userInfo]; CGRect keyboardRect = [

UITextview text not showing top lines after rotation in iOS7

强颜欢笑 提交于 2019-12-14 01:27:10
问题 I have an app that contains a UITextview that displays static text. I used a UITextview to get scrolling for the text, which is much longer than can be displayed in a UILabel. For some reason, the text in a UITextview under iOS 7 does not stay scrolled to the top after a rotation. This works as expected when run under iOS 6. This can be shown by creating a project with a UITextview that is centered on the storyboard with margins around 50. Then add constraints that pin the UITextview to the

How do I tell Safari iOS7 not to stop css animations on scroll?

柔情痞子 提交于 2019-12-13 21:12:20
问题 I have a rotating css animation that stops when the page is scrolled. I tried enabling the hardware acceleration but without luck. This doesn't work while the page is scrolled -webkit-animation: rotating 5s linear infinite; -webkit-transform-style: preserve-3d; -webkit-transform: translateZ(0); 回答1: In short: You can't. It's a feature, not a bug. iOS Safari stops ALL JS and animation on scroll to conserve battery life (try scrolling a page of animated gifs, for instance). I've heard you can

Error in NSURLSessionDownloadTask

最后都变了- 提交于 2019-12-13 20:43:07
问题 I am trying to update the user's location on the backoffice even while the app is in backgound, so I trigger a location update calling the following php script: -(void)locateUserAtLocation:(CLLocation*)location{ NSDictionary* dict=[self getCurrentAppAndUrlDictionary]; NSString* app=[dict objectForKey:@"app"]; float latitude=location.coordinate.latitude; float longitude=location.coordinate.longitude; NSString* language=[[NSLocale currentLocale] localeIdentifier]; NSString* nickName=[

UIProgressView custom images doesn't work in iOS 7.1

别等时光非礼了梦想. 提交于 2019-12-13 07:06:31
问题 I have an app using progress views with custom images. I use the code below: [cell.proStatus setTrackImage: [[UIImage imageNamed:@"CircleGrey.png"] resizableImageWithCapInsets:UIEdgeInsetsZero]]; [cell.proStatus setProgressImage: [[UIImage imageNamed:@"CirclePurple.png"] resizableImageWithCapInsets:UIEdgeInsetsZero]]; It all works fine in iOS 6 and 7.0 - BUT when updating to iOS 7.1 it doesn't show the images - just the small little thin line (the standard progress view). What do I do? I have