swift   29099

« earlier    

Namespaces In Swift - Cocoacasts
The first Swift pattern I use in every project that has any complexity to it is namespacing with enums and structs. Swift modules make the need for class prefixes obsolete. In Objective-C, it is a best practice to use a class prefix to avoid naming collisions with other libraries and frameworks, including Apple’s. Even though modules are an important step forward, they are not as flexible as many of us would want them to be. Swift currently doesn’t offer a solution to namespace types and constants within modules. A very common problem I run into when working with Swift is defining constants in such a way that they are easy to understand by anyone working on the project. In Objective-C, this would look something like this. NSString * const CCAPIBaseURL = @"https://example.com/v1"; NSString * const CCAPIToken = @"sdfiug8186qf68qsdf18389qsh4niuy1"; This works fine, but it isn’t pretty and easy to read. Even though Swift doesn’t support namespaces within modules, there are several viable solutions to this problem
namespaces  swift  cocoacast 
23 hours ago by Xmath
Xcode: A Better Way to Deal with Storyboards – iOS App Development – Medium
Apple have made the great improvements in the Interface Builder in Xcode 8. Using the size classes became more intuitive, ability to zoom your storyboard is very convenient, and the full preview…
storyboard  programming  swift  coding  better 
yesterday by Xmath
Untitled (https://www.youtube.com/watch?v=n-st1-DpKHI)
The first of my talks is online! Check out "A Modest Introduction to " & lemme know what you think!
Swift  tpc2017dc  from twitter
yesterday by genehack

« earlier    

related tags

ai  alamofire  animation  api  apple  architecture  article  better  bezpieczeństwo  blog  bootstrapping  bridge  bug  button  cadisplaylink  calayer  centering  chrislattner  cifilter  closures  cocoa  cocoacast  codable  code  coding  color  compiler  computer  constraint  core-graphics  coreimage  coreml  corner  creativecoding  curated_list  customerservice  customviews  data  date  debug  deis  design-patterns  design  designpatterns  dev  developer  development  diy  draw  drawing  dsl  elm  font  framework  functional  functionalprogramming  geometry  github  gui  howto  i18n  ibdesignable  indie  ios-development  ios  ios11  ios:uicollectionview  iosdev  iphone  json  kotlin  layout  library  llvm  machinelearning  macos  mapping  medium  metal  ml  modules  moven  namespaces  obj-c  objc.io  objc  object  objective-c  openradar  opensource  patterns  performance  picker  playgrounds  prezentacje  programming  property-list  push  quality  radar  raywenderlichcom  react-native  reactiveprogrammng  realm  report  repository  resume  reviews  rxswift  server  software  sonar  stack-view  stackoverflow  startup  storyboard  swift-string  tech  testing  tests  theme  time  tips  tool  toolkit  tools  tpc2017dc  ui  uicolor  uiview  unit  url-session  vapor  viper  vision  waterscope  windows  wwdc  xcode 

Copy this bookmark:



description:


tags: