iphone-x

IphoneX View hidden beside the Tabbar controller's tabbar

戏子无情 提交于 2019-12-11 18:55:55
问题 I have tabbar controller from one of the tab one view controller is pushed. in pushed view controller there is view (Camera) which is fixed height and with bottom with safearea. This view is hidden beside the tabbar in iPhone X but with other device it is correctly visible. Please suggest solution Thanks in advance Here is constraint in Iphone 6 in Iphone X See the camera view is hidden 回答1: I managed to solve this issue by uncheck under bottom bar of view controller. It is strange that with

Detect whether iphone is of notch screen or normal rectangle screen to avaid navigation bar size issue?

梦想与她 提交于 2019-12-11 17:53:28
问题 I am facing an issue in implementing expandable banner on top like whatsapp do in profile screen. When user scroll image squeezes and convert into navigation bar. For that i have to set minimum height in my code but due to notch screen in iphone X and other new iphones it causing issue. Because old iphone doesnot have notch screen so there navigation bar height is less than new iphones? So there is any way to find out the iphone is notch screen or normal type screen? 回答1: This way you can

iPhone X home indicator behavior

我怕爱的太早我们不能终老 提交于 2019-12-11 15:59:38
问题 I am trying to emulate a behavior of the home indicator on iPhone X but can't figure out how. In some apps, the home indicator goes dim, and you have to swipe it to activate normal behavior. I have found an option in the Controller to hide the indicator, but that isn't what I am looking for. In Clash Royale and Clash of Clans, for example, the home indicator dims, then when you swipe up on it the indicator gets brighter, and if you do it again it activates 'home'. Hiding the indicator using

Show Status Bar only for iPhone X

心不动则不痛 提交于 2019-12-11 01:22:53
问题 Looking to hide the status bar if it is not iPhone X and show the status bar if it is iPhone X. Most likely this will have to be done programmatically since there is no key that supports this functionality in the plist (closest one I found is UIStatusBarHidden ) 回答1: Method 1: You have to add this value to plist: " View controller-based status bar appearance " and set it to " NO ". After that add this in AppDelegate var window: UIWindow? func application(_ application: UIApplication,

safeAreaLayoutGuide returning wrong values on blocked rotation

淺唱寂寞╮ 提交于 2019-12-10 18:28:09
问题 In my application I do have two viewControllers: VideoListViewController - portrait only VideoPlayerViewController - landscape only VideoListViewController opens VideoPlayerViewController via self.present(viewController...) I'm blocking orientations via: override var supportedInterfaceOrientations: UIInterfaceOrientationMask { return .portrait } My problem is that portrait only view receives the landspace safe area... On my VideoListViewController.layoutSubviews I printed self

setNavigationBarHidden animation not working as expected on iPhone X

柔情痞子 提交于 2019-12-10 17:08:14
问题 I have code that enters full screen mode by hiding the UINavigationController's navigation bar. I want a smooth animated zooming effect when entering full screen. I use setNavigationBarHidden(_:animated:). This has all worked fine up to now, even on iOS 11, but on iPhone X the animation is not working well. On hiding, there is no animation and the nav bar just disappears. On unhiding, it does animate but the nav bar appears at a slower rate than the navigation controller's content area

Difficulty getting depth of face landmark points from 2D regions on iPhone X (SceneKit/ARKit app)

岁酱吖の 提交于 2019-12-10 11:03:44
问题 I'm running face landmark detection using the front-facing camera on iPhone X, and am trying very hard to get 3D points of face landmarks (VNFaceLandmarkRegion2D gives image coordinates X, Y only). I've been trying to use either the ARSCNView.hitTest or ARFrame.hitTest , but am so far unsuccessful. I think my error may be in converting the initial landmark points to the correct coordinate system. I've tried quite a few permutations, but currently based on my research this is what I've come up

Subclassing NSLayoutConstraint constant based on screen height

僤鯓⒐⒋嵵緔 提交于 2019-12-10 10:14:29
问题 I have a project with a Tab Bar, and a custom Navigation bar for each of the tabs. Each of the Navigation bar UIViews have a height constraint constant set in the storyboard. I would like to subclass this NSLayoutConstraint (for the Nav height), so that it changes the height for iPhone X. The Navigation bar needs to be much taller on an iPhone X, and since I'm not using "out of the box" objects, my constraints need to be manually set. Essentially, I want to do something like the following in

Custom UIToolbar too close to the home indicator on iPhone X

╄→尐↘猪︶ㄣ 提交于 2019-12-09 16:28:38
问题 I have a custom UIToolbar that I'm showing when the tab bar is hidden. The toolbar buttons are too close to the home indicator on iPhone X: let toolbar = UIToolbar() let height = tabBarController?.tabBar.frame.height toolbar.frame = CGRect(x: 0, y: view.bounds.height - height, width: view.bounds.width, height: height) toolbar.autoresizingMask = [.flexibleWidth, .flexibleTopMargin] view.addSubview(toolbar) Buttons are too close to the home indicator This is what I want it to look like (Mail

Save depth images from TrueDepth camera

断了今生、忘了曾经 提交于 2019-12-09 06:49:50
问题 I am trying to save depth images from the iPhoneX TrueDepth camera. Using the AVCamPhotoFilter sample code, I am able to view the depth, converted to grayscale format, on the screen of the phone in real-time. I cannot figure out how to save the sequence of depth images in the raw (16 bits or more) format. I have depthData which is an instance of AVDepthData . One of its members is depthDataMap which is an instance of CVPixelBuffer and image format type kCVPixelFormatType_DisparityFloat16 . Is