Mac OSX Pasteboard

Need to copy a value to the Pasteboard?

Don’t forget to clear it first.

Brand Colours

I’m working on an app and using https://fastlane.tools and using snapshot and frameit and wanted to use the annotation with keyword colours.

YouTube

https://www.youtube.com/yt/brand/en-GB/color.html

Full Colour Specifications 1 HEX: e52d27 | RGB: 229.45.39 | CMYK: 4.96.97.1

Full Colour Specifications 2 HEX: b31217 | RGB: 179.18.23 | CMYK: 20.100.100.12

Full Colour Specifications 3 HEX: 000000 | RGB: 0.0.0 | CMYK: 100.100.100.100

Facebook

http://www.color-hex.com/color-palette/185

Color Hex RGB
#3b5998 (59,89,152)
#8b9dc3 (139,157,195)
#dfe3ee (223,227,238)
#f7f7f7 (247,247,247)
#ffffff (255,255,255)

Twitter

https://about.twitter.com/company/brand-assets

Google

#4285f4

Batch renaming files

I needed to batch rename some files

brew install rename

To test run it

rename -n -e 's/-.*-/_/'  *.png

Remove the -n to perform it

rename -e 's/-.*-/_/'  *.png

I wanted to remove the following -portrait

rename -d -portrait *

Thanks to

http://stackoverflow.com/questions/24102974/mac-os-x-terminal-batch-rename

http://superuser.com/questions/398709/mass-remove-file-prefix-on-a-mac

iOS Charts

https://github.com/danielgindi/ios-charts/blob/master/README.md

http://www.appcoda.com/ios-charts-api-tutorial/
I’m going to add some graphing to the app soon.

Haven’t tried this yet but it looks good.

DynamicGraphView
Core Plot

http://www.raywenderlich.com/13269/how-to-draw-graphs-with-core-plot-part-1

http://www.raywenderlich.com/13271/how-to-draw-graphs-with-core-plot-part-2

I had a couple of difficulties using it in a newer version of Xcode so added my findings here.
iOS Plot

https://github.com/honcheng/iOSPlot
iOS Charts

https://github.com/egymgmbh/ios-charts

Collection Operators

Reading Chapter 7 – KVC/KVO of Cocoa Programming

https://www.bignerdranch.com/we-write/cocoa-programming/

And learning about Array Operators like

  • avg
  • count
  • max
  • min
  • sum

These could come in handy.

NSNumber *theAverages
theAverage = [employees valueForKey:@"avg.expectedRaise"];

They also have a forum (http://forums.bignerdranch.com)

Other Articles

http://nshipster.com/kvc-collection-operators/

Mac OS X – Dev

I bought:

https://www.bignerdranch.com/we-write/cocoa-programming/

I’ve got version 3, 4 & 5.

Working through 4 now as it’s ObjC.

I’m going to document things I’ve had to look up.

Chapter 2

Probably look back and say why didn’t I spot this but it should help it not happing again:

Unknown type name ‘NSTextField’

#import <Cocoa/Cocoa.h> 

Could have just added a .pch file

Project Settings
Under the ‘Apple LLVM 6.0 – Language’ section in the ‘Prefix Header’ I added “<PROJECTNAME>/<PROJECTNAME>-Prefix.pch”

hRandom-Prefix.pch

#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

.

Adding A Settings Bundle

I’d like to add a Settings section to my app to show Licenses and other info.

Maybe put the Options section there too.

https://codehappily.wordpress.com/2014/03/18/ios-how-to-create-an-ios-settings-entry-for-your-app-using-settings-bundle/

http://stackoverflow.com/questions/6428353/best-way-to-add-license-section-to-ios-settings-bundle/6453507#6453507

Run a perl script:

perl <scriptname.pl>
Follow

Get every new post delivered to your Inbox.