Post

Replies

Boosts

Views

Activity

Reply to XCode 15 warnings
I am sorry, I meant hang point, not "pont" . As far as more complete code goes, I don' t see much point, since it happens at initailization of a CGFloat instance variable, but here you go, code for the entire class: class FileOrFolderCell: UICollectionViewCell, CustomCell { @IBOutlet weak var emojiLabel: UILabel! @IBOutlet weak var nameLabel: MarqueeLabel! @IBOutlet weak var emojiBadge: UILabel! @IBOutlet weak var imageView: UIImageView! let emojiLabelInitialFontSize: CGFloat = 64 @IBOutlet weak var newBadge: UILabel! var url: URL! var thumbURL: URL? var isNew = false { didSet { newBadge.isHidden = !isNew } } var emoji = "" { didSet { emojiLabel.text = emoji emojiBadge.text = emoji } } func setFontSizesFor(width: CGFloat) { emojiLabel.font = emojiLabel.font?.withSize(32) newBadge.font = newBadge.font?.withSize(20) } } As you see, there is basically nothing there and whatever little this is, it all has to run on the UI thread (it is a subclass of UICollectionView).
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’24
Reply to Read from smb server connected in 'Files' App
My experience with this indicates that you also have to enclose the call to URL(resolvingBookmarkData:) between startAccessingSecurityScopedResource() and stopAccessingSecurityScopedResource() for it to work reliably. After much searching, I only found a passing reference to this fact somewhere on the web (which, to my knowledge, appears not to be properly documented) and suddenly, a lot of issues I was having went away as if by magic.
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’23
Reply to XCode 15 warnings
A StackOverflow user suggested switching Xcode versions, and indeed, using 15.2 instead of 15.3 appears to have solved the problem.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to XCode 15 warnings
I am sorry, I meant hang point, not "pont" . As far as more complete code goes, I don' t see much point, since it happens at initailization of a CGFloat instance variable, but here you go, code for the entire class: class FileOrFolderCell: UICollectionViewCell, CustomCell { @IBOutlet weak var emojiLabel: UILabel! @IBOutlet weak var nameLabel: MarqueeLabel! @IBOutlet weak var emojiBadge: UILabel! @IBOutlet weak var imageView: UIImageView! let emojiLabelInitialFontSize: CGFloat = 64 @IBOutlet weak var newBadge: UILabel! var url: URL! var thumbURL: URL? var isNew = false { didSet { newBadge.isHidden = !isNew } } var emoji = "" { didSet { emojiLabel.text = emoji emojiBadge.text = emoji } } func setFontSizesFor(width: CGFloat) { emojiLabel.font = emojiLabel.font?.withSize(32) newBadge.font = newBadge.font?.withSize(20) } } As you see, there is basically nothing there and whatever little this is, it all has to run on the UI thread (it is a subclass of UICollectionView).
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Read from smb server connected in 'Files' App
My experience with this indicates that you also have to enclose the call to URL(resolvingBookmarkData:) between startAccessingSecurityScopedResource() and stopAccessingSecurityScopedResource() for it to work reliably. After much searching, I only found a passing reference to this fact somewhere on the web (which, to my knowledge, appears not to be properly documented) and suddenly, a lot of issues I was having went away as if by magic.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23