Тег ‘UIKit’:

Custom UINavigationBar with image and back button

Many people could not find this solution! It’s really very simple solution and it does not contain any private methods and functions. It’s based on the drawRect method and the simple manipulation with the title. If the title is specified, then the text of title displays, but if not, then displays the image.

Теги: , , , , ,

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

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)

Samples code for iPad development from apple

ToolbarSearch This sample shows how to use a search field in a toolbar. When you start a search, a table view displaying recent searches matching the current search string is displayed in a popover. New controller: 1UIPopoverControllerDelegate Create a navigation controller to contain the recent searches controller, and create the popover controller to contain the [...]

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

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

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)

How to find bug in xCode project of iPhone application.

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

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

Custom change orientation

Solution for change orientation with uitabbar and others exeptions. 12[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];           [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didOrientation:) name:@"UIDeviceOrientationDidChangeNotification" object:nil]; And method 1234567891011121314- (void) didOrientation: (id)object {            UIInterfaceOrientation interfaceOrientation = [[object object] orientation];      if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {       [...]

Теги: , , , , , ,

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

How-To: Show/sync volume control in iPod/MediaPlayer

Developing for the iPhone, we wanted to show a volume control that sync’ed with the user’s volume control buttons on the side of the phone. It turns out, the best way to do this is to show the volume control using the MPVolumeView class (part of the MediaPlayer framework). 12345MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame: [...]

Теги: , , ,

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

Hello Music Player

Here is a bare bones hello world-style example that demonstrates library access and music playback. In a few minutes you can have a working, if minimal, music player. Lacking a user interface, this code queues up the entire iPod library and starts playing immediately on launch. Note: To follow these steps you’ll need a provisioned [...]

Теги: , , , ,

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

Resize and Mask an Image

Make image with a mask! Source: 123456789101112131415161718192021222324252627282930313233343536373839404142- (UIImage*) maskImage:(UIImage *)image  {            CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();            UIImage *maskImage = [UIImage imageNamed:@"mask.png"];      CGImageRef maskImageRef = [maskImage CGImage];            // create a bitmap graphics context the size of the image     [...]

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

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

Spin UI Object, animation rotate 360 Degree

Rotate object / image 360 degrees on iphone For anyone following along, you’ll need to add the QuartzCore Framework to your project and include the 1#import <QuartzCore/QuartzCore.h> Add animation for object: 123456    CABasicAnimation *fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];     fullRotation.fromValue = [NSNumber numberWithFloat:0];     fullRotation.toValue = [NSNumber numberWithFloat:((360*M_PI)/180)];     fullRotation.duration = 6; [...]

Теги: , ,

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