Тег ‘objective-c’:
Рубрики: 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
Рубрики: Mac OS X, Tutorials on Feb.26, 2010
Step by step for starter developers…
1. Create a project in xCode with name “DragAndDrop” or any else…2. Add an element “NSImageView” on main view in the MainMenu.xib
Теги: Apple, Mac OS X, NS, objective-c, OOP, Tutorials, work, xCode
Рубрики: Android, Mac OS X, Mob1serv, iPad, iPhone on Feb.25, 2010
Hi there! We are a group of iPhone / Android developers who have developed a suite of web services to assist us and other developers in building great apps.
After numerous projects we have become tired of having to set up the server scripts to do all the same things for different clients. Most of the [...]
Теги: Android, Apple, iPad, iPhone, life, Mob1serv, objective-c, OOP, Private, work, Кодинг
Рубрики: 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 Feb.02, 2010
If you will need launch AppStore application with search request – use this example
NSString *str = @"itms-apps://ax.search.itunes.apple.com";
str = [NSString stringWithFormat:@"%@/WebObjects/MZSearch.woa/wa/search?media=software&term=", str];
str = [NSString stringWithFormat:@"%@3d4medical", str];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString:str]];
Теги: AppStore, iPad, iPhone, Mac OS X, objective-c, OOP, Кодинг
Рубрики: 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.15, 2010
Here is a little tip on how to tell if a string contains another string, using the underused data type NSRange.
NSRange gives the starting location and the length of a given value, and is often used with arrays and strings. On this occasion we will use it to find the range of a substring within [...]
Теги: Apple, iPhone, NSString, objective-c, OOP, xCode, Кодинг
Рубрики: OOP, iPhone on Jan.14, 2010
I created a class (Foo.m) which I would like to be able to call a method in the controller (MainViewController.m) which instantiated it. How do I do this?
One way you can do this is to create a property in your Foo class that references its creator. You should not retain this reference to avoid circular [...]
Теги: objective-c, OOP, xCode