iphone Programming Glossary: stretchableimagewithleftcapwidth
iPhone development: How to create colored or translucent background for UIActionSheet? http://stackoverflow.com/questions/1181272/iphone-development-how-to-create-colored-or-translucent-background-for-uiaction UIActionSheet actionSheet UIImage theImage UIImage imageNamed @ detail_menu_bg.png theImage theImage stretchableImageWithLeftCapWidth 32 topCapHeight 32 CGSize theSize actionSheet.frame.size draw the background image and replace layer content UIGraphicsBeginImageContext..
How can I create a big, red UIButton with the iPhone SDK? http://stackoverflow.com/questions/1427818/how-can-i-create-a-big-red-uibutton-with-the-iphone-sdk sampleButton setFont UIFont boldSystemFontOfSize 20 sampleButton setBackgroundImage UIImage imageNamed @ redButton.png stretchableImageWithLeftCapWidth 10.0 topCapHeight 0.0 forState UIControlStateNormal sampleButton addTarget self action @selector buttonPressed forControlEvents..
Change iPhone UISlider bar image http://stackoverflow.com/questions/2379326/change-iphone-uislider-bar-image to them the rest is taken care of automagically UIImage sliderLeftTrackImage UIImage imageNamed @ SliderMin.png stretchableImageWithLeftCapWidth 9 topCapHeight 0 UIImage sliderRightTrackImage UIImage imageNamed @ SliderMax.png stretchableImageWithLeftCapWidth 9 topCapHeight.. stretchableImageWithLeftCapWidth 9 topCapHeight 0 UIImage sliderRightTrackImage UIImage imageNamed @ SliderMax.png stretchableImageWithLeftCapWidth 9 topCapHeight 0 mySlider setMinimumTrackImage sliderLeftTrackImage forState UIControlStateNormal mySlider setMaximumTrackImage..
Adding view on StatusBar in iPhone http://stackoverflow.com/questions/2833724/adding-view-on-statusbar-in-iphone UIImageView alloc initWithFrame self.frame backgroundImageView.image UIImage imageNamed @ statusBarBackgroundGrey.png stretchableImageWithLeftCapWidth 2.0f topCapHeight 0.0f self addSubview backgroundImageView backgroundImageView release TODO Insert subviews labels imageViews..
Creating a “chat bubble” on the iPhone, like Tweetie http://stackoverflow.com/questions/351602/creating-a-chat-bubble-on-the-iphone-like-tweetie touch share improve this question I suggest using the stretch method they recommend for button images. UIImage stretchableImageWithLeftCapWidth 15 topCapHeight 13 You can see a working example by downloading Twitterfon 's source it's on the FAQ page . You can see..
How can I set a button background color on iPhone? http://stackoverflow.com/questions/372731/how-can-i-set-a-button-background-color-on-iphone
Slider which helps to unlock the iPhone http://stackoverflow.com/questions/4236998/slider-which-helps-to-unlock-the-iphone UIImage imageNamed @ sliderback_max.png UIImage tumbImage UIImage imageNamed @ slider_thumb.png minImage minImage stretchableImageWithLeftCapWidth 25.0 topCapHeight 0.0 maxImage maxImage stretchableImageWithLeftCapWidth 25.0 topCapHeight 0.0 lockScreenSlider setMinimumTrackImage.. @ slider_thumb.png minImage minImage stretchableImageWithLeftCapWidth 25.0 topCapHeight 0.0 maxImage maxImage stretchableImageWithLeftCapWidth 25.0 topCapHeight 0.0 lockScreenSlider setMinimumTrackImage minImage forState UIControlStateNormal lockScreenSlider setMaximumTrackImage..
How to adjust UIToolBar left and right padding http://stackoverflow.com/questions/6021138/how-to-adjust-uitoolbar-left-and-right-padding right padding which shown below From Interface Builder From Code UIImage buttonImage UIImage imageNamed @ button.png stretchableImageWithLeftCapWidth 10 topCapHeight 0 UIButton btnTest UIButton buttonWithType UIButtonTypeCustom btnTest setBackgroundImage buttonImage forState.. btnTest.titleLabel setFont UIFont boldSystemFontOfSize 13 btnTest setBackgroundImage imgToolbarButton stretchableImageWithLeftCapWidth 5 topCapHeight 0 forState UIControlStateNormal btnTest addTarget self action @selector clearDateEdit forControlEvents UIControlEventTouchUpInside..
UITableView cell with background image http://stackoverflow.com/questions/6329832/uitableview-cell-with-background-image this question For Cell cell.backgroundView UIImageView alloc initWithImage UIImage imageNamed @ cell_normal.png stretchableImageWithLeftCapWidth 0.0 topCapHeight 5.0 autorelease cell.selectedBackgroundView UIImageView alloc initWithImage UIImage imageNamed @ cell_pressed.png.. 5.0 autorelease cell.selectedBackgroundView UIImageView alloc initWithImage UIImage imageNamed @ cell_pressed.png stretchableImageWithLeftCapWidth 0.0 topCapHeight 5.0 autorelease For Tableview mEditTableView setBackgroundView nil mEditTableView setBackgroundView UIImageView..
Implement view like standard iPhone SMS-chat bubbles view http://stackoverflow.com/questions/663435/implement-view-like-standard-iphone-sms-chat-bubbles-view same thing in Tweetie and draw the chat bubble text and avatar all together into a single view. You can use UIImage stretchableImageWithLeftCapWidth NSInteger leftCapWidth topCapHeight NSInteger topCapHeight to create a stretchable chat bubble to put behind each cell in..
Customization of UINavigationBar and the back button http://stackoverflow.com/questions/7066874/customization-of-uinavigationbar-and-the-back-button id target selector SEL selector UIImage image UIImage imageNamed @ button_back image image stretchableImageWithLeftCapWidth 20.0f topCapHeight 20.0f NSString title NSLocalizedString @ Back nil UIFont font UIFont boldSystemFontOfSize 12.0f UIButton.. id target selector SEL selector UIImage image UIImage imageNamed @ button_square image image stretchableImageWithLeftCapWidth 20.0f topCapHeight 20.0f NSString title NSLocalizedString @ Cancel nil UIFont font UIFont boldSystemFontOfSize 12.0f UIButton.. NSString title target id target selector SEL selector UIImage image UIImage imageNamed @ button_submit image image stretchableImageWithLeftCapWidth 20.0f topCapHeight 20.0f UIFont font UIFont boldSystemFontOfSize 12.0f UIButton button UIButton styledButtonWithBackgroundImage..
iOS SDK : playing music on the background and switching views http://stackoverflow.com/questions/8467533/ios-sdk-playing-music-on-the-background-and-switching-views isPlay UIImage buttonImageNormal UIImage imageNamed @ play.png UIImage stretchableButtonImageNormal buttonImageNormal stretchableImageWithLeftCapWidth 0 topCapHeight 0 MusicButton setBackgroundImage stretchableButtonImageNormal forState UIControlStateNormal myMusic pause.. else UIImage buttonImageNormal UIImage imageNamed @ pause.png UIImage stretchableButtonImageNormal buttonImageNormal stretchableImageWithLeftCapWidth 0 topCapHeight 0 MusicButton setBackgroundImage stretchableButtonImageNormal forState UIControlStateNormal NSLog @ Music..
Changing the background color of a UIAlertView? http://stackoverflow.com/questions/883208/changing-the-background-color-of-a-uialertview theBody setTextColor UIColor blueColor UIImage theImage UIImage imageNamed @ Background.png theImage theImage stretchableImageWithLeftCapWidth 16 topCapHeight 16 CGSize theSize theAlert frame .size UIGraphicsBeginImageContext theSize theImage drawInRect CGRectMake..
|