@property(nonatomic,assign) BOOL automaticallyAdjustsScrollViewInsets NS_AVAILABLE_IOS(7_0); // Defaults to YES
self.automaticallyAdjustsScrollViewInsets = NO;
automaticallyAdjustsScrollViewInsets是在ViewController中添加scrollView后,上下会默认自动留白,设为NO即不会有留白,NavigationBar由barTintColor改为backgroundImage后,便不会下移。