ios8

How can I show/hide the status bar on a pageViewController using tap gesture (iOS8 / Swift)

独自空忆成欢 提交于 2019-12-23 10:09:16
问题 Looking through all the solutions given to similar questions, I have been trying to get the statusBar to show/hide with a tap gesture. I have set View controller-based status bar appearance = NO in the plist. I have tried the following code in my DataViewController (page view controller) AND in the RootViewController : let app = UIApplication.sharedApplication() app.setStatusBarHidden(true, withAnimation: UIStatusBarAnimation.Fade) and it doesn't work. This is embedded in a UITabBarController

AVAudioRecorder in iOS 8 does not handle kAudioFormatMPEG4AAC

旧时模样 提交于 2019-12-23 10:00:53
问题 My code worked fine until iOS 8 kAudioFormatMPEG4AAC but now it creates an empty file. No errors are reported. When I changed it to kAudioFormatLinearPCM it works. This is my code: recordSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey, [NSNumber numberWithInt: kAudioFormatLinearPCM], AVFormatIDKey, [NSNumber numberWithInt:16], AVEncoderBitRateKey, [NSNumber numberWithInt: 1], AVNumberOfChannelsKey, [NSNumber

implicit conversion of 'unsigned long 'UIUserNotificationSettings *' is disallowed with arc

亡梦爱人 提交于 2019-12-23 09:27:22
问题 Push notification in iOS 8 Doesn't work. Error display: implicit conversion of 'unsigned long 'UIUserNotificationSettings *' is disallowed with arc Code: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [application registerUserNotificationSettings:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge)]; return YES; } I'm using ios 8.0 and xcode 6 beta. 回答1: I am getting from below from official

State Restoration with Multiple Storyboards

孤街醉人 提交于 2019-12-23 09:21:48
问题 I am working on a project with multiple storyboards. I want to implement state restoration in this project. I am having a problem linking the ViewControllers on second storyboard into the state restoration process. encodeRestorableStateWithCoder: & decodeRestorableStateWithCoder: methods are invoked only for ViewControllers associated with the Main storyboard. How do you link the ViewControllers in the second storyboard to the state restoration process? 回答1: When you load a class from the

didRangeBeacon called without any beacons found

荒凉一梦 提交于 2019-12-23 09:10:33
问题 I registered my own location manager to monitor and range a few beacons: [self.locationManager startMonitoringForRegion:region]; [self.locationManager startRangingBeaconsInRegion:region]; My understanding is, when one or more beacons is found this delegate method is called: - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region This delegate method is indeed called when I turned on my beacon, but the beacons array is empty. Is

Error Domain=NSURLErrorDomain Code=-1017 “cannot parse response”

北战南征 提交于 2019-12-23 08:56:53
问题 Here I am getting error while I post json. Error Domain=NSURLErrorDomain Code=-1017 "cannot parse response" UserInfo=0x7f89dac01a40 {NSUnderlyingError=0x7f89e0277a20 "cannot parse response", NSErrorFailingURLStringKey= http://test-onboard.qlc.in/FieldSense/authenticate , NSErrorFailingURLKey= http://test-onboard.qlc.in/FieldSense/authenticate , _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-1, NSLocalizedDescription=cannot parse response} Here is my code: NSDictionary *dictionaryData=[

ios 8 Homescreen webapp, turning iPad off and on stops javascript

自闭症网瘾萝莉.ら 提交于 2019-12-23 08:10:09
问题 I have a fullscreen HTML5 web app for iPads and have just installed IOS 8 to try it out and it all works perfectly until you power the iPad off and back on. As soon as the web app relaunches javascript just stops and loading new pages doesn't restart it. When opening the same page in Safari on the iPad, turning the iPad off and on it carries on working as expected. Anyone else noticed this or come up with a work around? 回答1: This seems to me resolved in the iOS8.1.1 update. 回答2: I noticed

Why am i getting this clang error: _fwrite$UNIX2003 on simulator with iOS 8

旧巷老猫 提交于 2019-12-23 07:47:41
问题 I have downloaded the new iOS 8 into both my phone and the latest Xcode onto my Mac. It all works fine but after loading up and trying the new iPhone 6 plus simulator when I try the iPhone 4s or 5 simulators (it works with 5s) I get the following error: Undefined symbols for architecture i386: "_fwrite$UNIX2003", referenced from: leveldb::(anonymous namespace)::PosixEnv::~PosixEnv() in Firebase(env_posix.o) leveldb::(anonymous namespace)::PosixEnv::~PosixEnv() in Firebase(env_posix.o) ld:

bridgeToObjectiveC not available on Swift Beta 5

爷,独闯天下 提交于 2019-12-23 07:11:48
问题 I'm writing an app that uses bridgeToObjectiveC() on a String object. Since Beta 5 this is no longer available. I'm trying to do this: self.myList.filter{($0 as MyClass).name.bridgeToObjectiveC().localizedCaseInsensitiveContainsString(searchText)} Which gives me the error: 'String' does not have a member named 'bridgeToObjectiveC' What is the equivalent code in Beta 5? 回答1: Use as to cast to NSString for the same effect: ("string" as NSString).localizedCaseInsensitiveCompare("other string")

Silent push message, can´t react if app is in background and unplugged

心不动则不痛 提交于 2019-12-23 05:39:33
问题 I am trying to react on silent push messages. I registered my app for the two background modes in my plist file. I am sending the following json to my app: { "aps": { "content-available": 1 }, "Bla": "Blub" } If my app is in foreground, everything works. As I am receiving the push I execute a function in my code. If my app is in background and plugged to my Mac or ac, everythings fine as well... But if I unplug my device, the device is not getting or at least my function is not called anymore