Тег ‘UIKit’:
Рубрики: Apple, Mac OS X, OOP, iPad, iPhone on Feb.09, 2010
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 [...]
Теги: Apple, iPad, iPhone, UIKit, UINavigationBar, Кодинг
Рубрики: 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, iPad, iPhone on Jan.29, 2010
Теги: Apple, IB, iPad, iPhone, UI, UIKit, xCode, xib
Рубрики: Apple, Mac OS X, iPad, iPhone on Jan.29, 2010
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:
UIPopoverControllerDelegate
Create a navigation controller to contain the recent searches controller, and create the popover controller to contain the navigation controller.
UINavigationController *navigationController [...]
Теги: Apple, iPad, iPhone, objective-c, OOP, UIGestureRecognizer, UIKit, UIPopoverController
Рубрики: 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
Рубрики: Apple, OOP, iPhone on Jan.18, 2010
Теги: Apple, Debugger, iPhone, objective-c, OOP, OS, QA, UIKit, Кодинг
Рубрики: iPhone on Jan.12, 2010
Solution for change orientation with uitabbar and others exeptions.
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didOrientation:) name:@"UIDeviceOrientationDidChangeNotification" object:nil];
And method
- (void) didOrientation: (id)object {
UIInterfaceOrientation interfaceOrientation = [[object object] orientation];
if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
self.view.transform = CGAffineTransformMakeRotation(0);
} [...]
Теги: Apple, iPhone, objective-c, OOP, UIInterface, UIKit, UITabBar
Рубрики: iPhone on Jan.08, 2010
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).
MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame:
[...]
Теги: iPhone, MediaPlayer, objective-c, UIKit
Рубрики: Apple, iPhone on Jan.07, 2010
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 device [...]
Теги: iPhone, MediaPlayer, objective-c, UIKit, xCode
Рубрики: Apple, iPhone on Dec.26, 2009
Make image with a mask!
Source:
- (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
CGContextRef mainViewContentContext = CGBitmapContextCreate (NULL, maskImage.size.width, maskImage.size.height, 8, 0, [...]
Теги: Apple, iPhone, Mac OS X, objective-c, Texture, UIKit, work, xCode, Кодинг