1.uiscrollview Setting background image
Setup the Scroll View
uiscrollview*tempscrollview= (uiscrollview*) Self.view;
Tempscrollview.contentsize=cgsizemake (320,720);
Set stationary Background, so, and the user scroll the Background is
Fixed.
Uiimage*img =[uiimage imagenamed:@ "Bg-body.jpg"];
[Tempscrollview Setbackgroundcolor:[uicolor colorwithpatternimage:img];
2. UIView Set Background image
Self.view.backgroundColor = [Uicolor colorwithpatternimage: [UIImage imagenamed:@ "1.jpg"];
3. To compare the following types of recommendations
Set a background picture in UIView
uiimageview* Bgview = [[Uiimageview alloc]initwithimage:ttimage (@ "bundle://uiscrollviewbg1.jpg")];
Bgview.frame = CGRectMake (0, 0, scrollView.frame.size.width, scrollView.frame.size.height);
[Self addsubview:bgview];
[Bgview release];
Set a background picture in Uiscrollview
uiimageview* Bgview = [[Uiimageview alloc]initwithimage:ttimage (@ "Bundle://uiscrollviewbg.png")];
Bgview.frame = CGRectMake (0,-100, 320, 100);
[_scrollview Addsubview:bgview];
[Bgview release];
Source code for background images under iOS UIView and Uiscrollview