ios11

Text View expand or contract upon clicking see more button

旧时模样 提交于 2019-12-10 23:08:51
问题 In my tableView cell, I have a textView whose string i'm getting via JSON and updating the cell height dynamically like this func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { if indexPath.section == 0 { return 255 } return UITableViewAutomaticDimension } Here's a screenshot Now initially i want text view to show a little text and upon clicking see more button it should expand and upon expansion the button text should change to see less also if the

UITableViewCell hide separator using separatorInset fails in iOS 11

拈花ヽ惹草 提交于 2019-12-10 20:55:23
问题 This is the code I used to hide the separator for a single UITableViewCell prior to iOS 11: - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.row == 0) { // Remove separator inset if ([cell respondsToSelector:@selector(setSeparatorInset:)]) { [cell setSeparatorInset:UIEdgeInsetsMake(0, tableView.frame.size.width, 0, 0)]; } // Prevent the cell from inheriting the Table View's margin settings if ([cell

Swift 3: How to access the value of matrix_float3x3 in a 48-byte CFData?

安稳与你 提交于 2019-12-10 20:09:35
问题 I'm trying to access intrinsic matrix following this answer. By running the commend below, I was able to get a 48-byte AnyObject, and I further convert it into a CFData. let camData = CMGetAttachment(sampleBuffer, kCMSampleBufferAttachmentKey_CameraIntrinsicMatrix, nil) However, I checked the output of sampleBuffer in CMSampleBuffer.h : /*! @constant kCMSampleBufferAttachmentKey_CameraIntrinsicMatrix @abstract Indicates the 3x3 camera intrinsic matrix applied to the current sample buffer.

Is it possible to upload to App Store using Xcode 9 GM?

≯℡__Kan透↙ 提交于 2019-12-10 19:27:55
问题 I just prepared an app which is compatible with iOS 11. When I export through Xcode 9 GM I'm not getting any issue. same thing I'm exporting through Xcode 8.3.3 getting alignment issue on one page. Can we upload an application through Xcode 9 GM or shall we need to wait until an official update for Xcode 9 in Mac Appstore? Thanks in advance. 回答1: Yes developer can upload binary through GM(Golden Master) Xcode build actually this is a pre release of final Xcode build it can be used to build &

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

Save password in preferences under “Accounts & Passwords”

半世苍凉 提交于 2019-12-10 18:19:35
问题 At WWDC Apple presented the AutoFill feature for iOS Apps in a presentation. It is fairly simple to set up and works really well. If the user entered a password in safari and saved it. However, if the user never used Safari, but only the app, currently the user still has to type out the password every time. I am already storing the password in the keychain. Unfortunately this does not put the password in the settings below " Accounts & Passwords > App & Website Passwords ". Is there any way,

Smooth scrolling with prefersLargeTitles and UITableView

拟墨画扇 提交于 2019-12-10 17:32:07
问题 I encountered a problem with the scrolling when using the prefersLargeTitles and added UITableView . If I set the prefersLargeTitles within a navigation controller and its root is a UITableViewController everything is fine, scrolling of the navigation large title works the same way we can see in the system apps (in iOS 11+) . The problem However, if I use a UIViewController and add a UITableView in it, scroll seems to act differently. Navigation bar is moving more/faster than I actually

swift 4 - HMCharacteristicTypeSerialNumber deprecated

浪子不回头ぞ 提交于 2019-12-10 14:58:30
问题 I want to read information of an accessory, typed HMAccessory , such as Serial number ( HMCharacteristicTypeSerialNumber ), manufacturer ( HMCharacteristicTypeManufacturer ), model ( HMCharacteristicTypeModel ) but they all are deprecated in iOS11, according to this Apple doc here. I know I can instead use the characteristicType string directly, like below: HMCharacteristicTypeSerialNumber -> 00000030-0000-1000-8000-0026BB765291 HMCharacteristicTypeManufacturer -> 00000020-0000-1000-8000

Additional alert shows up using AppAuth to authenticate in swift4

送分小仙女□ 提交于 2019-12-10 14:40:06
问题 I am using AppAuth 0.90.0 for authentication using an external authentication server where a user can log in so the app receives appropriate authentication tokens. Since recently (after upgrade to swift 4) I get the following alert before I get sent to the authentication server: "App Name" Wants to Use "externalAuthentication.com" to Sign in" This allows the app and website to share information about you. Has someone experienced the same issue and/or has a solution so the user does not need

AVCaptureMetadataOutputObjectsDelegate not called in swift 4 for QR scanner

杀马特。学长 韩版系。学妹 提交于 2019-12-10 14:14:33
问题 I was working on QR code scanner app on iOS where i was getting output AVCaptureOutput on the delegate method captureOutput:didOutputMetadataObjects:fromConnection: . It was working perfectly on swift 3. After I've updated to xcode 9 and swift 4, it stopped working. 回答1: Okay I've found an update here. Found that AVCaptureMetadataOutputObjectsDelegate method is changed from captureOutput(_ captureOutput: AVCaptureOutput!, didOutputMetadataObjects metadataObjects: [Any]!, from connection: