$ sudo port install ImageMagick
convertで削除
$ convert -crop 640x920+0+40 input.png output.png
参考
$ sudo port install ImageMagick
$ convert -crop 640x920+0+40 input.png output.png
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithWhite:0.0f alpha:0.8f]] forBarMetrics:UIBarMetricsDefault]; [self.navigationController.toolBar setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithWhite:0.0f alpha:0.8f]] forToolbarPosition:UIToolbarPositionBottom barMetrics:UIBarMetricsDefault];
#import "UIImage+Color.h" @implementation UIImage (Color) + (UIImage *)imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context, [color CGColor]); CGContextFillRect(context, rect); UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; } @end
// 対象のscrollView @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; : - (void)viewDidLoad { [super viewDidLoad]; // barを透明に self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; self.navigationController.toolbar.barStyle = UIBarStyleBlackTranslucent; UIEdgeInsets insets; // contentを縮める insets= self.scrollView.contentInset; insets.top = self.navigationController.navigationBar.frame.size.height; insets.bottom = self.navigationController.toolbar.frame.size.height; self.scrollView.contentInset = insets; // スクロールバーの範囲を縮める insets = self.scrollView.scrollIndicatorInsets; insets.top = self.navigationController.navigationBar.frame.size.height; insets.bottom = self.navigationController.toolbar.frame.size.height; self.scrollView.scrollIndicatorInsets = insets; // そのままだと初期位置がnavigationBarに被るので下にずらす CGPoint point = self.scrollView.contentOffset; point.y = -1*self.scrollView.contentInset.top; self.scrollView.contentOffset = point; }
user@host01:~$ ssh user@host02 Warning: the ECDSA host key for 'host02' differs from the key for the IP address 'xxx.xxx.xxx.xxx' Offending key for IP in /home/user/.ssh/known_hosts:199 Matching host key in /home/user/.ssh/known_hosts:208 Are you sure you want to continue connecting (yes/no)?上記の例だと、/home/user/.ssh/known_hosts の199行目を削除して保存すればおk