Extelligent Cocoa
Because one brain is not enough
RSS
  • Home
  • About…
Application Design: Enums (with bonus tuple)

Jan 5 2017

Application Design: Enums (with bonus tuple)

In the zoom example app, to make life easier for me, I went for a cyclical zoom: 2x magnification, 3x magnification, 1x magnification. When Apple first announced Swift, I liked many things about it, but the thing that made me swoon was enums. Swift enums are wonderful tools to shape your application flow. Here, we […]

By Extelligent Cocoa • Application Design, Coding Meta • • Tags: enums, responsibilities, tuples, zoom

NSOutlineView Part1: Setting up an outlineView.

Jan 4 2017

NSOutlineView Part1: Setting up an outlineView.

Xcode 8.0, macOS 10.11 (This is Part 1 of 3; in which we will create an NSOutlineView with a flexible data structure that can be used for simple trees and for structures like the one below which contain a number of different, unrelated items. Part 2 will deal with inserting and deleting items, and reacting […]

By Extelligent Cocoa • Tutorials, Wiki • • Tags: enums, NSOutlineView, protocol-oriented programming

Basic Image Transformation

Jan 4 2017

Basic Image Transformation

(OSX 10.11, Xcode 8) Create a new app: drop an NSImageView and two buttons into the storyboard, set up an outlet for the image view and two actions – zoomIn and zoomOut for the buttons. 0) Not recommended: scaleUnitSquare @IBAction func zoomOut(_ sender: AnyObject) { imageView.scaleUnitSquare(to: NSSize(width: 0.4, height: 0.4)) } This works perfectly fine. […]

By Extelligent Cocoa • Graphics, Tutorials • • Tags: CALayer, CGAffineTransform, NSImageView, NSScrollView, zoom

Limited Stack

Jan 3 2017

Limited Stack

(Xcode 8.0, OSX 10.11) For the app I am currently working on, I wanted to implement the following: – user can import a picture – user can change their mind and undo their choice, up to a point – I don’t need to store a million images in my app And there are many ways […]

By Extelligent Cocoa • Extensions, Wiki • • Tags: collections, default values, generics, stack

Programming Tutorials Analogy

Jan 2 2017

Programming Tutorials Analogy

This image captures my experience with a lot of tutorials: they don’t tell you *how* to get from A to B, and if you don’t already have a good idea of what you’re trying to achieve (because you can program and just need to learn a new language/IDE/framework) chances are you’ll fail to learn unless […]

By Extelligent Cocoa • Teaching Programming •

AppleProgramming’s YouTube Tutorials

Jan 2 2017

AppleProgramming’s YouTube Tutorials

By mere chance I’ve come across the following list of Objective C tutorials on YouTube. (The author also has a couple of introductory Swift tutorials and seems to be continuing his tutorials in Swift, though they have not been updated recently, as far as I can see. He has, as far as I can see, […]

By Extelligent Cocoa • Resources, Teaching Programming • • Tags: teaching resources, tutorials: video

Spaceship Operator

Jan 1 2017

Spaceship Operator

Xcode 8.0, Swift 3, OSX 10.11 The following is a good example of creating your own operators. In the two years since first writing this, I have not found an actual use for this, but it appears to be a common operator in Ruby, and has been implemented several times in Swift. My example code […]

By Extelligent Cocoa • Extensions, Wiki • • Tags: Operators, Spaceship Operator

Colouring buttons

Dec 30 2016

Colouring buttons

(macOS 10.11; Xcode 8.0) This post deals with colouring buttons. Some of the techniques described are against Apple’s InterfaceDesign guidelines; others are simply against the rules of good taste. This post is an exploration of what is possible and will provide a handy reference in the future if I ever think ‘oh, I wish I […]

By Extelligent Cocoa • Interface, Wiki • • Tags: NSButton

Sticky: Welcome to Extelligent Cocoa (version 3)

Dec 30 2016

Sticky: Welcome to Extelligent Cocoa (version 3)

Terry Pratchett uses the term ‘Extelligence’ for the habit of storing information outside oneself. This Blog mainly exists to stand on the shoulders of giants and to store information in an accessible manner so that once I have solved a problem, I do not have to solve it again. ‘And because WordPress is a decent […]

By Extelligent Cocoa • EC Meta •

Create your own Xcode templates

Dec 26 2016

Create your own Xcode templates

Xcode 8, macOS 10.11 (I will test this with 10.12. Settings mostly borrowed from https://littlebitesofcocoa.com/89-custom-xcode-file-templates. Credit for working this out mainly goes to them, but I wanted to add a few additional observations. Also, I’m working on macOS rather than iOS.) When you are using certain classes a lot in your projects, having them as […]

By Extelligent Cocoa • Extensions • • Tags: Xcode

«< 2 3 4 5 6 >

Categories

  • Application Design
  • Bug Reports
  • Coding Meta
  • Design Patterns
  • EC Meta
  • Extensions
  • File Handling
  • Frameworks
  • Graphics
  • Interface
  • Operators
  • Real World Swift
  • Resources
  • SpriteKit
  • Teaching Programming
  • Tutorials
  • Wiki

Recent Posts

  • NSOutlineView: Saving expansion status
  • Saving a font to UserDefaults
  • Disclosure Triangle (Autolayout)
  • NSColorWell/NSTextField Bug
  • Get the modification (or creation) date of a file

Archives

  • August 2020
  • March 2020
  • September 2019
  • January 2019
  • August 2018
  • May 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • June 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016

Recent Wiki

  • Saving a font to UserDefaultsSaving a font to UserDefaults
    (Here using macOS 13, Xcode 10, Swift 4.2, but
  • Get the modification (or creation) date of a fileGet the modification (or creation) date of a file
    Xcode 10, Swift 4.2, macOS 10.13 func
  • NSDocumentController basicsNSDocumentController basics
    Xcode 10, macOS 13.5, Swift 4.2 Without wanting to
  • NSStackView TutorialNSStackView Tutorial
    (Xcode 9, macOS 10.12, Swift 4) Stackviews exist
  • Filetypes and UTIsFiletypes and UTIs
    macOS 10.12 (I will update this post once I’ve

Tags

AppDelegate Autolayout closures Codable containerView Core Data disclosure embed view enums FileAttributeKey FileManager generics initialFirstResponder NSAlert NSApplication.ModalResponse NSApplicationDelegate NSButton NSCoding NSColorWell NSDocumentController NSFont NSFontDescriptor NSImageView NSKeyedArchiver NSKeyedUnarchiver NSOpenPanel NSOutlineView NSPopover NSSavePanel NSScrollView NSStackView NSStoryboardSegue NSTextField NSTextFieldDelegate NSTitlebarAccessoryViewController NSToolbar NSToolbarItem NSView NSWindowController sheets singletons SKView storyboards UserDefaults zoom

↑

© Extelligent Cocoa 2023
Powered by WordPress • Themify WordPress Themes