initWithCoder是一个类在IB中创建,但在xcode中被实例化时被调用的,比如,通过IB创建了一个controller的nib文件,然后在xcode中通过initWithNibName来实例化这个controller,那么这个controller的initWithCoder会被调用。