Тег ‘UIImage’:
Рубрики: OOP, iPad, iPhone on Jun.10, 2010
+[UIImage imageNamed:]
• Reads the file, uncompresses it, caches result
• Cached copy of data is kept even if the UIImage is deallocated
• Low memory condition causes cache to be purged.
• No direct control over when cache is purged.
• Use for small frequently drawn images.
+[UIImage imageWithContentsOfFile:]
• Just reads enough of file to determine if it can open [...]
Теги: iPad, iPhone, Memory, objective-c, UIImage, UIKit, Ukraine, work, Кодинг
Рубрики: Apple, Mac OS X, iPad, iPhone on Mar.10, 2010
Sample
+ (UIImage*)greenBubble
{
if (sGreenBubble == nil) {
UIImage *i = [UIImage imageNamed:@"Balloon_1.png"];
sGreenBubble = [[i stretchableImageWithLeftCapWidth:15 topCapHeight:13] retain];
}
return sGreenBubble;
}
+ (UIImage*)grayBubble
{
if (sGrayBubble == nil) {
UIImage *i = [UIImage imageNamed:@"Balloon_2.png"];
sGrayBubble = [[i stretchableImageWithLeftCapWidth:21 topCapHeight:13] retain];
[...]
Теги: iPad, iPhone, objective-c, UIImage, UIInterface, UIKit
Рубрики: iPhone on Feb.03, 2010
Presented simple and nice solution for radio buttons, based on the UIButton.
Add buttons on view of controller
for (int i = 0; i < 5; i++) {
UIButton *but = [UIButton buttonWithType:UIButtonTypeCustom];
[but setImage:[UIImage imageNamed:@"checkbox.png"] forState:UIControlStateNormal];
[but setImage:[UIImage imageNamed:@"checkedbox.png"] forState:UIControlStateSelected];
[but setFrame:CGRectMake(0, 0, 17, [...]
Теги: Apple, iPhone, objective-c, OOP, Private, UIButton, UIImage, UIKit, Кодинг
Рубрики: Apple, iPhone on Jan.21, 2010
Change RGB color of the picture
- (UIImage *) changeColor: (UIImage *)image {
UIGraphicsBeginImageContext(image.size);
CGRect contextRect;
contextRect.origin.x = 0.0f;
contextRect.origin.y = 0.0f;
contextRect.size = [image size];
// Retrieve source image and begin image context
CGSize itemImageSize = [image size];
CGPoint itemImagePosition;
itemImagePosition.x = ceilf((contextRect.size.width [...]
Теги: iPhone, objective-c, UIImage, UIKit
Рубрики: iPhone on Nov.20, 2009
Реализация слайдшоу!
Мелочь, которую можно быстро вставить в свой проект!
Компакто, в плане кода!
Спасибо разработчику, ресурс!
Mirror
Теги: iPhone, objective-c, UIImage, Кодинг
Рубрики: Apple, Mac OS X, iPad, iPhone on Feb.17, 2009
На сегодняшний день всем хочется красивости и примочек, iPhone приложения не исключения! Вот реализовал по своему. Может кому покажется не так. Если у вас есть другие, более оптимальные варианты реализации, буду рад выслушать.
Вот что из этого получилось:
Объект first выдвигается и задвигается с левой стороны, а second с правой стороны, плюс можно перемещать за любое место [...]
Теги: design, iPhone, objective-c, UIImage, UIKit, xCode