Check
1. Client Key
2. Application Id
2014年9月26日 星期五
2014年9月17日 星期三
Parse iOS Quickstart Tutorial
1. Download Parse SDK
2. New iOS project.
3. Drag Parse SDK to your project and check "Copy items into destination group's folder (if needed)"
4. Choose project target in "File Navigator"
5. "Build Phases" -> "Link Binary With Libaries"
6. Add "+" ->
2. New iOS project.
3. Drag Parse SDK to your project and check "Copy items into destination group's folder (if needed)"
4. Choose project target in "File Navigator"
5. "Build Phases" -> "Link Binary With Libaries"
6. Add "+" ->
- Accounts.framework
- AudioToolbox.framework
- CFNetwork.framework
- CoreGraphics.framework
- CoreLocation.framework
- libz.dylib
- MobileCoreServices.framework
- QuartzCore.framework
- Security.framework
- Social.framework
- StoreKit.framework
- SystemConfiguration.framework
7. Back to project and open "AppDelegate.m"
8. #import <Parse/Parse.h>
9. Enter the code inside the application:didFinishLaunchingWithOptions: function:
[Parse setApplicationId:@"zZXgMM7F5659CtZPpQ91Yx81nX0Wdxxxxxxxxxxx"
clientKey:@"1wWrsmVLjuku0iHKDrZqAkIczaHjPaxxxxxxxx"];
10. And to track statistics around application opens, add the following below that:
[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];
2014年9月14日 星期日
New a custom UITableViewCell
New a custom UITableViewCell
12. Good job and try.
1. New Xib -> choose Empty.
2. Drag UITableViewCell and give a identifier.
3. Drag elements you want.
4. New file -> Objective-C class and inherit UITableViewCell.
5. Back to Xib.
6. Edit Custom class (same with the new Objective-C class).
must has
7. Connect xib elements to .m IBOutlet.
8. Go to xxxUITableViewController.m
9. (Only have .m) In ViewDidLoad: [YourTableView registerClass:[YourTableViewCell class] forCellReuseIdentifier:CellIdentifier];
10. (With xib) In ViewDidLoad: [YourTableView registerNib:[UINib nibWithNibName:@"YourTableViewCell's name" bundle:nil]
11. In cellForRowAtIndexPath:
2. Drag UITableViewCell and give a identifier.
3. Drag elements you want.
4. New file -> Objective-C class and inherit UITableViewCell.
5. Back to Xib.
6. Edit Custom class (same with the new Objective-C class).
must has
- (id) initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
}
return self;
}
7. Connect xib elements to .m IBOutlet.
8. Go to xxxUITableViewController.m
9. (Only have .m) In ViewDidLoad: [YourTableView registerClass:[YourTableViewCell class] forCellReuseIdentifier:CellIdentifier];
10. (With xib) In ViewDidLoad: [YourTableView registerNib:[UINib nibWithNibName:@"YourTableViewCell's name" bundle:nil]
forCellReuseIdentifier:CellIdentifier];
YourTableViewCell *cell = (YourTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:CellIdentifier owner:self options:nil];
cell = (YourTableViewCell *)[nib objectAtIndex:0];
}
12. Good job and try.
訂閱:
文章 (Atom)