iphone-x

AutoResizing for iPhone X

旧巷老猫 提交于 2019-12-17 16:10:48
问题 Does autoresizing masks work on iPhoneX? When Apple introduced What's New in Auto Layout last year, everything works fine with no constraints . However, when I try auto layout on iPhoneX simulator, it doesn't work for the safe area . (✓ Use Safe Area Layout Guides) Auto Layout (without constraint) With constraints 回答1: is there any alternate way if anyone found, please update the answer here may be I did wrong I tried something and customize yourself where you need, in here I used in

Why page Push animation Tabbar moving up in the iPhone X

给你一囗甜甜゛ 提交于 2019-12-17 10:22:48
问题 I build a app Demo, use hidesBottomBarWhenPushed hide Tabbar in Push Animation. But, When I click Jump Button Tabbar move up!? like this: 回答1: Answer provided by VoidLess fixes TabBar problems only partially. It fixes layout problems within tabbar, but if you use viewcontroller that hides tabbar, the tabbar is rendered incorrectly during animations (to reproduce it is best 2 have 2 segues - one modal and one push. If you alternate the segues, you can see tabbar being rendered out of place).

iPhone X Flashlight turns off when AR Camera is enabled

孤人 提交于 2019-12-14 03:47:20
问题 I am building an AR app that needs the flashlight to be turned on torch mode. Turning on torch mode and then enabling the AR scene works fine on my iPhone 8, but on the iPhone X, it the flashlight turns on and then off again. Is there some way around this, or something specific I have to do for the iPhone X to work? - (void)turnTorchOn:(bool) on { Class captureDeviceClass = NSClassFromString(@"AVCaptureDevice"); if (captureDeviceClass != nil) { AVCaptureDevice *device = [AVCaptureDevice

iPhone Xs Max: AVCaptureVideoPreviewLayer when added to sublayer of View occupies less than the safe area of the iphone x - why?

孤街浪徒 提交于 2019-12-13 06:36:22
问题 I am trying to build a custom camera using a single view application with the new iPhone Xs Max. With reference to the screenshot below, it can be seen that the video output displayed in AVCaptureVideoPreviewLayer occupies less than the safe area of the screen on the iPhone x. How do I calculate the space that has not been occupied? How do I know that the AVCaptureVideoPreviewLayer occupies less than the safe area? Well, the top border of the top 'Button' is anchored to the top border of the

TWTRComposerViewController not appearing in iPhone X landscape

浪尽此生 提交于 2019-12-13 03:25:10
问题 We are implementing TWTRComposerViewController in our landscape App for posting tweets from the App using videos created within the App. We're using the below written code: if (Twitter.sharedInstance().sessionStore.hasLoggedInUsers()) { let txtString = "App-Name" let composer = TWTRComposerViewController(initialText:txtString, image:nil, videoURL:nil) composer.delegate = self viewController.present(composer, animated: false, completion: { completion(true) }) } else { Twitter.sharedInstance()

How to remove extra space from the top of the Table View in iPhone X using Objective C iOS

妖精的绣舞 提交于 2019-12-12 20:27:53
问题 I have already developed an app in Objective C which is working fine in all the iPhone mobiles. But when I am running this app in iPhone X Simulator then I dont know how I am getting some extra space (about 20-22 pixels) in the top of the UITableView. I tried all this solutions, but none of the below helped me : self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, 0.01f)]; self.edgesForExtendedLayout = UIRectEdgeNone;

iPhone XS not being recognized properly in Android Studio for Flutter App

雨燕双飞 提交于 2019-12-12 18:24:02
问题 I just received an iPhone XS for development, and I'm running into an issue using it to run my Flutter App in Android Studio. When I plug in my old iPhone 6s, Android Studio shows this , just the normal name of the iPhone. But when I plug my XS in, it shows this, a huge string that looks like it's showing the command line tools for ideviceinfo. This is also causes an error when trying to install the app: Installing and launching... error: module importing failed: ('invalid syntax', ('temp.py'

Existing app crashes on startup on iPhone X Simulator

时光毁灭记忆、已成空白 提交于 2019-12-12 12:29:50
问题 I have an existing app, that crashes on launch, when running on iPhone X Simulator. (Breakpoint stops on the main.m files). The app runs fine on iPhone 8 simulator, so it has something to with iPhone X. Also, it has something to do with the status bar, since the stack shows something with [UIStatusbar _prepareForVisualProviderIfNeeded] before the crash. Do I need to do something with status bar to run this app on iPhone X Simulator? 回答1: Found the answer here: All exception break point is

iPhoneX and Notch detection

≯℡__Kan透↙ 提交于 2019-12-12 07:36:23
问题 Using Javascript; how can I check if the users device is an iPhoneX? Also, how can I determine what side the iPhones' 'notch' is positioned when in the landscape orientation? There are some great articles out there: https://webkit.org/blog/7929/designing-websites-for-iphone-x/ ... but these tend to take advantage of cutting-edge features that aren't natively supported in many mobile browsers at the time of writing this. 回答1: So I've come up with a method of detecting the iPhoneX with

Extend the View Underneath the Status Bar and Multi-tasking Bar on iPhone X Without Manually Adjusting Constraints in Code?

…衆ロ難τιáo~ 提交于 2019-12-12 05:05:05
问题 I was wondering if there's a way to extend a view to be underneath the status bar and multi-tasking bar of the iPhone X without manually adjusting constraints in code based on the device. Using the safe area, container, container margins and top/bottom layout guides doesn't seem to help because the status bar is a different height on the iPhone X vs the previous iPhones and the safe area ends at the top of the multi-tasking bar whereas it ends at the bottom of the screen for previous iPhones.