In my current application,I have to design a login page.which contains username and password textfields.but my requirement is to insert image(instead of submit button).can anyone give a clear idea about this 开发者_开发知识库task?
You need to use a UIImage instead of a UIButton. Instructions here - http://iphonesdkpro.com/iOS+SDK+Using+a+UIImage+as+a+Button+iPhone+SDK
Make sure that the jpg is imported into your project in Xcode.
Launch Interface Builder with your .xib.
Create the UIButton. Click on it and press Cmd-1 to show the button's Attributes.
Change the button Type to Custom.
Click on the Image element in the palette and choose the jpg image you want to use,
OR
If you prefer to have text over the image, instead change the Background element to your image.
精彩评论