Тег ‘xCode’:
Рубрики: 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
Рубрики: Apple, iPad, iPhone on Jan.29, 2010
Теги: Apple, IB, iPad, iPhone, UI, UIKit, xCode, xib
Рубрики: 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
Рубрики: 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, Кодинг
Рубрики: iPhone on Nov.26, 2009
Very simple installation and in usage.
Installation in iPhone project:
1. Add files RegexKitLite.h and RegexKitLite.m to project.
2. Open Target of project and add -licucore in Other Linker Flags
3. Compile
Example:
Remove tags from web-page.
NSString *text = [content stringByReplacingOccurrencesOfRegex:@"<.*>" withString:@""];
Site resource
Теги: iPhone, objective-c, RegExp, xCode
Рубрики: iPhone on Oct.29, 2009
Little modified UIActivityIndicatorView with the ability to display activity indicator before the download data.
UIDownloadActivityIndicator.h
@class UIProgressView;
@protocol UIDownloadActivityIndicatorDelegate;
@interface UIDownloadActivityIndicator : UIActivityIndicatorView {
NSURLRequest* DownloadRequest;
NSURLConnection* DownloadConnection;
NSMutableData* receivedData;
NSString* localFilename;
id<uidownloadactivityindicatordelegate> delegate;
long long bytesReceived;
long long expectedBytes;
float percentComplete;
}
- (UIDownloadActivityIndicator *)initWithURL:(NSURL *)fileURL withActivityIndicatorStyle:(UIActivityIndicatorViewStyle)style timeout:(NSInteger)timeout delegate:(id</uidownloadactivityindicatordelegate><uidownloadactivityindicatordelegate>)theDelegate;
- (void) [...]
Теги: iPhone, objective-c, OOP, xCode, Кодинг
Рубрики: iPhone on Oct.14, 2009
This is just one possible configuration – one of the simpler ones, actually, as it is only using point rendering and simple gravity – no textures, no wind, no transparency, etc. I call this configuration “fountain”, and it’s can be created in one line of code:
ParticleEmitter3D *fountain = [ParticleEmitter3D fountain];
then, you just need to tell [...]
Теги: iPhone, OpenGL, xCode, Кодинг
Рубрики: Mac OS X, Python, others on Oct.11, 2009
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
[...]
Теги: Django, Mac OS X, MySQL, Python, SVN, xCode