How to set background image of a view?

后端 未结 7 1274
梦如初夏
梦如初夏 2020-12-04 16:35

I am a beginner at Obj-C/Cocoa Touch/iPhone OS.

I wish to have a background for my app with different images everytime the the view is called.

Say I have 10

7条回答
  •  臣服心动
    2020-12-04 17:30

    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"imageName.png"]];
    

    more info with example project

提交回复
热议问题