Рубрика: ‘Mac OS X’

Streatch image

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

Теги: , , , , ,

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

Tutorial: Drag and Drop file on NSImageView

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

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

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

Universal web services suite for iPhone/iPad and Android apps

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

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

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

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

Теги: , , , , ,

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

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:
UIPopoverControllerDelegate

Create a navigation controller to contain the recent searches controller, and create the popover controller to contain the navigation controller.
UINavigationController *navigationController [...]

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

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

Проблема при переустановке Eclipse в Mac OS X

Столкнулся с проблемой отказа запускаться вновь установленной среды разработки.
Причиной этому стали права на запускаемый фаил!
./eclipse
-bash: ./eclipse: Permission denied
Исправляется очень просто:
sudo chmod a+x /Applications/Eclipse/Eclipse.app/Contents/MacOS/eclipse
Интересно получается, до этого ставил несколько раз и все было отлично, а в этом случае вот так вот!
Поставил, а потом:

Теги: ,

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

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

#import <QuartzCore/QuartzCore.h>

Add animation for object:

CABasicAnimation *fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
fullRotation.fromValue = [NSNumber numberWithFloat:0];
fullRotation.toValue = [NSNumber numberWithFloat:((360*M_PI)/180)];
fullRotation.duration = 6;
fullRotation.repeatCount = 1e100f;
[myview.layer addAnimation:fullRotation forKey:@"360"];

Remove all animations for object:

[myview.layer removeAllAnimations];

Source

Теги: , ,

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

Setup Python, MySQL, MySQL-python and SVN on MAC OS X 10.6

Mac Os X + Python 2.6.1+ PIL + apache2.2 +mod_python + MySQL + MySQLdb +php5+ phpMyAdmin + SVN server +WebSVN
OS: Mac OS X 10.6.1 Snow Leopard
XCode:The latest Xcode Tools
Python: Python 2.6.1 64-bit (Snow Leopard default)
Projects will be located in ~/Sites, so change permissions:
add read permission for everyone on ~/Sites
Setup django
[...]

Теги: , , , , ,

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

Objective-c MD5 hash

This is a simple md5 implementation.
Add a file CommonDigest.h in your project from
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk /usr/include/CommonCrypto/
#import "CommonDigest.h"
 
+ (NSString *)uniqueIDFromString:(NSString *)source
{
    const char *src = [[source lowercaseString] UTF8String];
    unsigned char result[CC_MD5_DIGEST_LENGTH];
    CC_MD5(src, strlen(src), result);
 
    NSString *ret = [[[NSString alloc] initWithFormat:@"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
                        result[0], result[1], [...]

Теги:

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

Google Chrome OS

Теги: , ,

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