xcode9

Play video in active UITableView's cells in swift

时光总嘲笑我的痴心妄想 提交于 2020-01-01 14:05:47
问题 Target :- I am trying to play video in fully visible cell (it may be 2,3 or 1) & it should be stop with invisibility of cell I am using UITableview with AVPlayer . My tableview is full of video listing currently i am using videos from bundle, I used below code, But it's playing incorrectly & weired sequence. What i am doing wrong here? Answer with another logic is also fine for me. ViewController.swift - protocol VideoActivityDelegate { func startVideo() func stopVideo() } // MARK: TableView

Xcode download for Snow Leopard

浪子不回头ぞ 提交于 2020-01-01 10:05:24
问题 Older threads mention that there is a download for Xcode for Snow Leopard listed in the Xcode downloads on https://developer.apple.com/downloads/index.action?name=Xcode if you are logged-in as an enrolled iOS developer - but I can't see it. A comment on this thread has a direct link to the download, but clicking on the link redirects to an "Access Denied" error page: https://stackoverflow.com/questions/7662246/cant-download-xcode-4-for-snow-leopard-anymore 回答1: you can refer to here. or if

“Failed to set plugin placeholders” message?

折月煮酒 提交于 2020-01-01 07:32:09
问题 Xcode 9.1 Simulator 10.0 OSX 10.12.6 I would like to upload a new build of my sticker pack to iTunes Connect. But Product > Archive is grayed out. So I ran the Simulator and got ""Failed to set plugin placeholders for (name)." Only one answer anywhere in the whole world -- delete Derived Data Folder. I did and got same error message. BTW Under General in Xcode the Version is 1. The build is 1.4. Does the build number have to be changed somewhere else as well? 回答1: What worked for me, Go to

What is NSFaceIDUsageDescription - Face ID Usage Description Info.plist key?

孤者浪人 提交于 2020-01-01 07:28:07
问题 There is a new privacy NSFaceIDUsageDescription Info.plist key in the Xcode 9 GM where a developer supplies the usage description for the permissions alert. Does anyone have a link to docs on it? The plist view in Xcode summarizes it as: Privacy - Face ID Usage Description 回答1: Now further explained in the above mentioned forum (by an Apple employee) https://forums.developer.apple.com/message/265156: Face ID requires adding a usage string with the key NSFaceIDUsageDescription (aka Privacy -

How to add a safe area programmatically

那年仲夏 提交于 2020-01-01 04:58:06
问题 When you open the view, it will look like the image below, i Phone x open view i Phone 8 open view For iphone x, I would like to add a safe area programmatically in the current view. The source to try is as follows. UIView *view = self.view; if (@available(iOS 11.0, *)) { UILayoutGuide * guide = view.safeAreaLayoutGuide; [view.topAnchor constraintEqualToAnchor:guide.topAnchor].active = YES; [view.bottomAnchor constraintEqualToAnchor:guide.bottomAnchor].active = YES; } I suppose to apply this

Profile is not an “iOS App Store” profile

回眸只為那壹抹淺笑 提交于 2020-01-01 04:45:08
问题 Using Xcode 9 . Working on app store build validation. Created an app with app store profile. Archived successfully Trying to validate build in Organizer, I am getting the following error on selecting the profile. This is the same profile used to archive and it is an app store profile. 2 Queries How to identify a profile if it is ad-hoc or app store Why did this happen?Pretty sure this is an appstore profile. 回答1: Just had the same issue All you need to do is to delete your provisioning

Pass data back to previous VC using delegates and update custom cell

自古美人都是妖i 提交于 2019-12-31 04:45:08
问题 I am trying to pass data BACK to the previous viewController using delegates. Does anyone know how to pass data back from ViewController B to ViewController A ? So I want to pass data from SecondVC to FirstVC and update custom table view cells with the data from SecondVC 4 address text fields but for some reason, it's not updating at all. Any help will be much appreciated as I'm just at the beginning level so tried all sorts of things but not able to get it to work. FirstVC import UIKit class

Make UIColor Codable

十年热恋 提交于 2019-12-30 08:18:08
问题 struct Task: Codable { var content: String var deadline: Date var color: UIColor ... } There are warnings saying "Type 'Task' does not conform to protocol 'Decodable'" and "Type 'Task' does not conform to protocol 'Encodable'". I searched and found that this is because UIColor does not conform to Codable. But I have no idea how to fix that. So... How to make UIColor Codable? 回答1: If you care only about the 4 color components this is a simple solution using a wrapper struct struct Color :

refreshPreferences HangTracerEnabled / HangTracerDuration messages in iOS 11 + Xcode 9

坚强是说给别人听的谎言 提交于 2019-12-30 00:53:10
问题 When update to iOS 11, after run app in iPhone, I receive this message in Xcode console: SibDiet[924:111682] refreshPreferences: HangTracerEnabled: 0 SibDiet[924:111682] refreshPreferences: HangTracerDuration: 500 SibDiet[924:111682] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0 And now I get this message in every simulator and app. How can I solve this problem? 回答1: You can hide this message with click left mouse button on your target, and next Edit Scheme

Could not build Objective-C module '_SwiftUIKitOverlayShims'

谁说胖子不能爱 提交于 2019-12-29 18:53:15
问题 In the Xcode8.3.3 project will not be a problem, but after upgrading to xcode9 , the compiler has a problem! Showing Recent Issues CompileSwift normal arm64 /Users/leekexi/Documents/macsrc/mtom/modules/ScrollerRefresh/RefreshConst.swift cd /Users/leekexi/Documents/macsrc/mtom /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -filelist /var/folders/cz/jq8bwvds0j52yy2j0p7_2kf40000gn/T/sources-86be14 -primary-file /Users/leekexi/Documents