Well, this is how I felt when I was listening ‘Happy’, em~ a masterpiece, don’t u think so~

![](http://tiger-a-s-s.tobybai.cn/2014-11-10 231742.jpg)

JUST KIDDING, Keep on Swift

Declare a swift dictionary
Initializer of struct

Pretty simple

Compare to the old syntax from OC, it’s much easier to init a struct. Swift forced you to assign values for every property, except you declare it as a optional one.

Swift Dictionary vs. NSDictionary

Look at this:

It seems like we are not using a rewritten new brand Class NSJSONSerialization, but just provided some swift Syntax to access old OC. If not so, we don’t need to Convert it to a NSDictionary. This is a awesome truth for tons of existing 3rd open source Objective-C libs, that means you can use them directly by several steps setting.

Cocoapods + Objective-C+Swift together!!

It amazed me! Can’t believe it was so easy to do!

  • Setup any cocoapods lib, I take pop for example.

  • Create a header file, import the libs like you did with OC before.

  • Include this header file in Build settings –> Swift Compiler –> Objective-C Bridging Header
    ![](http://tiger-a-s-s.tobybai.cn/屏幕快照 2014-11-12 上午11.37.59.png)

  • Use the libs obey Swift syntax, compare these two pieces of code to see differences.

Use assistant view to preview layout

Never knew there’s such nice way to preview layout. Thanks to Pasan!

![](http://tiger-a-s-s.tobybai.cn/屏幕快照 2014-11-12 上午11.47.07.png)

Resize label after input long text

Shortcut:  command  =

Some basic subversion command

The leader is too busy to move code from svn to git, and after upgrade to Yosemite, my Versions app would crash after launch. So I need to do it with command.

Sometimes command lines are more powerful & beautiful.