iOS: 设置ui background image

来源:互联网 发布:手机淘宝怎么搜图片 编辑:程序博客网 时间:2024/06/07 09:00

set uiview image background: (下面代码是pattern file,即重复image来

    self.view.backgroundColor = [UIColorcolorWithPatternImage:[UIImageimageNamed:@"title.png"]];


set uitableviewcell image background:

    UIImageView *bgView = [[UIImageViewalloc]initWithImage:[UIImageimageNamed:@"title_dept_date.png"]];

    bgView.alpha = 0.6;

    cell.backgroundView = bgView;



other ref links

http://stackoverflow.com/questions/5856373/uiimageview-background-image-and-rotation-help

http://stackoverflow.com/questions/8127189/how-to-stretch-scale-image-on-a-uiview

http://stackoverflow.com/questions/9521443/uiimageview-fill-in-uiview


原创粉丝点击