Тег ‘UIKit’:

ScrollView with scroll’s indicators, which are shown all the time.

My simple solution by writing category for UIImageView, because scroller is imageview. How to use :) Just setup tag for your scrollview and you will get one with scroll indicators, which are shown all the time. 1234567891011121314151617181920212223242526272829303132#define noDisableVerticalScrollTag 836913 #define noDisableHorizontalScrollTag 836914 @implementation UIImageView (ForScrollView) – (void) setAlpha:(float)alpha {         if (self.superview.tag [...]

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

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

Simple EKDemo – EKEvent

Now we have controller for creating events. This controller included from 4.0 iOS SDK. SimpleEKDemo The application uses table views to display EKCalendar object and EKEvent objects retrieved from an EKEventStore object. It implements EKEventViewController for viewing and editing existing EKEvents, and uses EKEventEditViewController for creating new EKEvents.

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

Комментарий (1)

My Custom UITextView with syntax highlighting

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

Комментарий (1)

Tweeting – example of Apple

Tweeting

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

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

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

Теги: , , , , , ,

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

Sample usage UIDownloadBar

Hello

Теги: , , ,

Комментарий (1)

Copy UI for additiolan screen

Пример копирования объектов UI на дополнительный экран Все очень просто, для копирования необходимо выполнить всего 2 метода. 12345// copy UI // archiving data NSData *archivedData = [NSKeyedArchiver archivedDataWithRootObject: window]; //extract data externalWindow =  [[NSKeyedUnarchiver unarchiveObjectWithData:archivedData] retain]; Внимание: Интерфейс копируется только без картинок, если будут картинки, то получите креш. Так же скопированные объекты не синхронизированны. Далее [...]

Теги: , , ,

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

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

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

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

Make gradient on iPhone/iPad

It’s easy! As of iPhone SDK 3.0, custom gradients can be implemented very easily, without subclassing or images, by using the new CAGradientLayer add framework 1#import < QuartzCore/QuartzCore.h> so, example:

Теги: , , , , , ,

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

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

Теги: , , , , ,

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