#TIL
Ensuring Colour Consistency between designs, Interface Builder and UIColor
vsanthanam.com - Shared by **@sherman** - July 18
You can restrict access to a stored property’s setter:
public private(set) var name: StringThe first public refers to the access level for the getter and the second private(set) refers to the access level for the setter
Swift - Shared by **@casey** - July 21
Xcode 9 does actually have code folding.
⌘-click a function > Fold
⌘ + Option + left arrow will fold the scope right will unfold
Xcode - Shared by **@casey** & **@adamc** - July 25
Røde is actually an Australian company… their first microphone sold “like a rat up a drainpipe” so they made up the name “Røde NT-1" just so it could be called rodent.
TheMoreYouKnow - Shared by **@adam** - Aug 7
The Progress class
- (void)startTaskWithData:(NSData *)data {
NSUInteger batchSize = ... use a suitable batch size
NSProgress *progress = [NSProgress progressWithTotalUnitCount:batchSize];
for (NSUInteger index = 0; index < batchSize; index++) {
// Check for cancellation
if ([progress isCancelled]) {
// Tidy up as necessary...
break;
}
// Do something with this batch of data...
// Report progress (add 1 because we've completed the work for the current index).
[progress setCompletedUnitCount:(index + 1)];
}
}Hipster - Shared by **@casey** - Aug 16
^ https://developer.apple.com/documentation/foundation/progress
Countdown of indexing files
defaults write com.apple.dt.Xcode IDEIndexerActivityShowNumericProgress -bool trueDefaults write - Shared by **baz** - Sept 2
Remove all untracked ignored and non-ignored files:
git clean -fxRemove all untracked directories:
git clean -fdgit - Shared by **@benthomas** - Sept 5
You can now toggle invisible files in Finder with:
⌘ + SHIFT + .(Also works in Save dialogs)
macos - Shared by **@jeanetienne** & **@huwr** - Sept 6
In interface Builder, Option-clicking the Embed in Stack button at the bottom of the screen brings up a menu which allows you to unembed a stack.
"It’s even nicer in Xcode 10 where you can embed in view and scroll view from that button as well"
Xcode - Shared by **@casey** & **@mattdelves** - Sept 9
TIL you can copy paste files between one mac and another with hand off
macos - Shared by **@huwr** - Sept 11
TIL alt + drag file in Xcode to duplicate the file 🤦♀️
Xcode - Shared by **@baz** - Sept 11

