關於下拉圖片放大問題(上下放大,左右放大)

第一種思路:
spa

首先設置導航欄爲透明的,而後設置背景圖片爲透明的(因爲有個陰影橫線(自帶,自定義能夠消除),因此設置爲無代理

[self.navigationController.navigationBar setTranslucent:YES];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"_transparent"] forBarMetrics:UIBarMetricsDefault];
 self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];

NSLayoutConstraint *NS_height //拉出來的約束,也能夠自寫

圖片的高度的constant屬性根據tableview的滑動距離(經過scrollView的代理方法獲取)進行上下放大縮小,當下拉時64則換回導航欄code


第二種思路orm

將圖片放到tableview上面。經過KVO監聽滑動,而後改變imageView的transform圖片

若是使勁下拉將會拉出去,圖片顯示不全it


第三種思路io

直接將imageView加入到window上去table

相關文章
相關標籤/搜索