Тег ‘UIImage’:

Color Picker for iOS

Example: 1234567891011121314151617181920212223242526272829303132333435363738394041- (void)viewDidLoad {     [super viewDidLoad];         // Do any additional setup after loading the view, typically from a nib.         if (self.cPicker == nil) {         [self.view setBackgroundColor:[UIColor grayColor]];         self.cPicker = [[VBColorPicker alloc] initWithFrame:CGRectMake(0, 0, 202, 202)];     [...]

Теги: , , , , , , , ,

Комментарии отсутствуют

Small feature with UIlabel

Add framework QuartzCore 12345678910111213141516#import <QuartzCore/QuartzCore.h> UILabel *label = [[UILabel alloc] init];      [label setTextColor:[UIColor whiteColor]];      [label setBackgroundColor:[UIColor darkGrayColor]];            [[label layer] setBorderWidth:2];      [[label layer] setCornerRadius:15];      [[label layer] setBorderColor:[UIColor whiteColor].CGColor];            [label setAlpha:0.8];      [label setTextAlignment:UITextAlignmentCenter];      [label setFrame:CGRectMake(0, [...]

Теги: , , , , , ,

Комментарии отсутствуют

UIImage and Memory

+[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 [...]

Теги: , , , , , , , ,

Комментарии отсутствуют

Streatch image with stretchableImageWithLeftCapWidth: topCapHeight:

Sample 1234567891011121314151617+ (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 = [...]

Теги: , , , , ,

Комментарии отсутствуют

Radio buttons for iPhone application

Presented simple and nice solution for radio buttons, based on the UIButton. Add buttons on view of controller 123456789for (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"] [...]

Теги: , , , , , , , ,

Комментариев (3)

Change RGB color of the picture

Change RGB color of the picture 12345678910111213141516171819202122232425262728293031323334353637383940414243- (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 [...]

Теги: , , ,

Комментариев (6)

Source of SlideShow

Реализация слайдшоу! Мелочь, которую можно быстро вставить в свой проект! Компакто, в плане кода! Спасибо разработчику, ресурс! Mirror

Теги: , , ,

Комментарии отсутствуют

Дизайним интерфейс в приложениях iPhone

На сегодняшний день всем хочется красивости и примочек, iPhone приложения не исключения! Вот реализовал по своему. Может кому покажется не так. Если у вас есть другие, более оптимальные варианты реализации, буду рад выслушать. Вот что из этого получилось: Объект first выдвигается и задвигается с левой стороны, а second с правой стороны, плюс можно перемещать за [...]

Теги: , , , , ,

Комментарии отсутствуют