Skip to content

Latest commit

 

History

History
156 lines (95 loc) · 3.08 KB

File metadata and controls

156 lines (95 loc) · 3.08 KB

#TIL

September 2018

fit right


Ensuring Colour Consistency between designs, Interface Builder and UIColor

inline


vsanthanam.com - Shared by **@sherman** - July 18

^ http://www.vsanthanam.com/writing/2017/7/6/colors-in-ios-ensuring-consistency-between-designs-interface-builder-and-uicolor


You can restrict access to a stored property’s setter:

public private(set) var name: String

The 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

inline

defaults write com.apple.dt.Xcode IDEIndexerActivityShowNumericProgress -bool true

Defaults write - Shared by **baz** - Sept 2

Remove all untracked ignored and non-ignored files:

git clean -fx

Remove all untracked directories:

git clean -fd

git - 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

Slides

https://melbournecocoaheads.com/til