Describes the common workflows to develop, test, and distribute your app.
Claire Keane

Love Begins
h
wallacepolsom
Aqua Utopia|海の底で記憶を紡ぐ

roma★
ojovivo
trying on a metaphor
Monterey Bay Aquarium
Mike Driver
Acquired Stardust
d e v o n

I'd rather be in outer space 🛸
Keni
YOU ARE THE REASON
Game of Thrones Daily
art blog(derogatory)

祝日 / Permanent Vacation
seen from United States

seen from United States

seen from Malaysia

seen from China

seen from Malaysia

seen from Mexico

seen from Singapore
seen from United Kingdom
seen from United States
seen from Germany

seen from Malaysia

seen from Canada
seen from United States
seen from United Kingdom
seen from United States

seen from United States
seen from United States

seen from T1
seen from United States
seen from United States
@iosdevnotes
Describes the common workflows to develop, test, and distribute your app.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Describes details about the features of existing iOS devices.
IOS Device Capabilities
Swift Alert with Activity Indicator
var alert: UIAlertView = UIAlertView(title: "Loading", message: "Please wait...", delegate: nil, cancelButtonTitle: "Cancel");
var loadingIndicator: UIActivityIndicatorView = UIActivityIndicatorView(frame: CGRectMake(50, 10, 37, 37)) as UIActivityIndicatorView loadingIndicator.center = self.view.center; loadingIndicator.hidesWhenStopped = true loadingIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray loadingIndicator.startAnimating();
alert.setValue(loadingIndicator, forKey: "accessoryView") loadingIndicator.startAnimating()
alert.show()
Getting Device Details with Swift
var currentDevice = UIDevice()
var screenHeight = UIScreen.mainScreen().nativeBounds.height
var screenWidth = UIScreen.mainScreen().nativeBounds.width
if (currentDevice.userInterfaceIdiom == UIUserInterfaceIdiom.Phone) { println("\(screenHeight)") println("\(screenWidth)")
if(screenHeight==960) { println("IPhone 4") } if(screenHeight==1136) { println("IPhone 5") } if(screenHeight==1334) { println("IPhone 6") } if(screenHeight==2208) { println("IPhone 6plus") } }
Singleton in Swift
import Foundation
let sharedInstance = AppSingleton();
final class AppSingleton{
var aSharedVariable:NSMutableString!
private init(){}
}

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Filling a UIImage with an NSURL data
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:MyURL]]];
Saving and Retrieving data from NSUserDefaults
-(void) saveIt:(NSString*)myToken{ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:myToken forKey:@"myToken"]; [defaults synchronize]; NSLog(@"Token saved: %@", myToken ); } -(NSString*) retrieveIt{ NSLog(@"Checking token in NSUserDefaults.."); NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString * myToken =[defaults objectForKey:@"myToken"]; NSLog(@"Token is: %@", myToken); return myToken; }
Orginizing Code with Pragma Mark
Pragma mark is simply a way to organize your methods in the method list pop up button in Xcode
After XCode 4, it only works between methods, so you can add a dummy methods at the beginning of your classes and then use the pragma mark like this: #pragma mark -My methods
(Source: http://cocoasamurai.blogspot.nl/2006/09/tip-pragma-mark-organizing-your-source.html )
Make special characters usable in URLs
Make special characters usable in URLs
- (NSString *)escape:(NSString *)text { return [(NSString *)CFURLCreateStringByAddingPercentEscapes( NULL, (CFStringRef)text, NULL, (CFStringRef)@”!*’();:@&=+$,/?%#[]”, CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)) autorelease]; }
The search text is URL-encoded using the escape: method to ensure that we’re making a valid URL. Spaces and other special characters are turned into things such as %20.
( Source: http://www.raywenderlich.com/5677/beginning-arc-in-ios-5-part-1 )
Nonatomic, Strong, Weak Explanation
Nonatomic
nonatomic is used for multi threading purposes. If we have set the nonatomic attribute at the time of declaration, then any other thread wanting access to that object can access it and give results in respect to multi-threading.
Copy
copy is required when the object is mutable. Use this if you need the value of the object as it is at this moment, and you don't want that value to reflect any changes made by other owners of the object. You will need to release the object when you are finished with it because you are retaining the copy.
Retain
retain is required when the attribute is a pointer to an object. The setter generated by @synthesize will retain (aka add a retain count to) the object. You will need to release the object when you are finished with it. By using retain it will increase the retain count and occupy memory in autorelease pool.
Strong
strong is a replacement for the retain attribute, as part of Objective-C Automated Reference Counting (ARC). In non-ARC code it's just a synonym for retain.
This is a good website to learn about strong and weak for iOS 5. http://www.raywenderlich.com/5677/beginning-arc-in-ios-5-part-1
Weak
weak is similar to strong except that it won't increase the reference count by 1. It does not become an owner of that object but just holds a reference to it. If the object's reference count drops to 0, even though you may still be pointing to it here, it will be deallocated from memory.
The above link contain both Good information regarding Weak and Strong.
(Source: http://stackoverflow.com/questions/9859719/xcode-property-attributes-nonatomic-copy-strong-weak )

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
ARC Strong vs. Weak Explanation
The difference is that an object will be deallocated as soon as there are no strong pointers to it. Even if weak pointers point to it, once the last strong pointer is gone, the object will be deallocated, and all remaining weak pointers will be zeroed out.
Perhaps an example is in order.
Imagine our object is a dog, and that the dog wants to run away (be deallocated).
Strong pointers are like a leash on the dog. As long as you have the leash attached to the dog, the dog will not run away. If five people attach their leash to one dog, (five strong pointers to one object), then the dog will not run away until all five leashes are detached.
Weak pointers, on the other hand, are like little kids pointing at the dog and saying "Look! A dog!" As long as the dog is still on the leash, the little kids can still see the dog, and they'll still point to it. As soon as all the leashes are detached, though, the dog runs away no matter how many little kids are pointing to it.
As soon as the last strong pointer (leash) no longer points to an object, the object will be deallocated, and all weak pointers will be zeroed out.
(source: http://stackoverflow.com/questions/9262535/explanation-of-strong-and-weak-storage-in-ios5 )
IOS 5 Icon Size and Naming Convension
How to change the image of a UIButton when selected
Found this solution on Stackoverflow.
Here is how I solved it. I am using IB in which I added a UIButton to the view.
I defined the button selected by default and selected my image for the selected state (Use drope-down list in inspector window to choose "Selected State Configuration" before selecting the image).
Create an IBAction in the controller and connect the button to that action.
Then see the code below:
-(IBAction) toggleUIButtonImage:(id)sender{ if ([sender isSelected]) { [sender setImage:unselectedImage forState:UIControlStateNormal]; [sender setSelected:NO]; }else { [sender setImage:selectedImage forState:UIControlStateSelected]; [sender setSelected:YES]; } }
I think this is quite a smooth solution. Hope it helps!
rotateButton
-(IBAction) rotateButton:(id)sender{ UIButton *btn = (UIButton *)sender; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.1]; btn.transform = CGAffineTransformMakeRotation((CGFloat)((20 * M_PI ) / 180)); btn.transform = CGAffineTransformMakeRotation(0); [UIView commitAnimations]; }
//call this on touch down
int to CGFloat
CGFloat f = (CGFloat)intVal; CGFloat f = 1.10;

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Adding UIImage to a UIView
UIImage* image1 = [UIImage imageNamed:[NSString stringWithFormat:@"myimage.png"]]; UIImageView* imgview1 = [[UIImageView alloc] initWithImage:image1]; [subview addSubview:imgview1]; [imgview1 release];
If Provisioning Profile Cannot Be Found
Open up the Terminal
cd into your iPhone project directory
cd into YourApp.xcodeproj
Edit the file project.pbxproj by using a text editor (open -a TextEdit filename)
Search for the string PROVISIONING_PROFILE
Surround the line containing PROVISIONING_PROFILE, with /* */ (comment block).
Do this for all lines containing PROVISIONING_PROFILE
Save file