Saturday, November 1, 2014
SQL select query
SELECT `id`, `log_id`, `log_type`, `store_id`, `orderNo`, `orderName`, `orderDate`, `orderComment` FROM `orderDetails` WHERE log_id ='1'
Sunday, May 4, 2014
Send string data to php server in iOS/Objective C
NSString *myRequestString = [[NSString alloc] initWithFormat:@"username=%@&password=%@&password2=%@", username, password, password2];
NSData *myRequestData = [ NSData dataWithBytes: [ myRequestString UTF8String ] length: [ myRequestString length ] ];
NSMutableURLRequest *request = [ [ NSMutableURLRequest alloc ] initWithURL: [ NSURL URLWithString:@"http://pratheepan.info/ws4/register.php"]];
[request setHTTPMethod: @"POST"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"];
[request setHTTPBody: myRequestData];
NSURLResponse *response;
NSError *err;
NSData *returnData = [NSURLConnection sendSynchronousRequest: request returningResponse:&response error:&err];
NSString *content = [NSString stringWithUTF8String:[returnData bytes]];
NSLog(@"responseData------------------: %@", content);
Tuesday, April 1, 2014
How to Distribute iOS Application
Before you can distribute your app, youʼll need to certify and provision your application within the Enterprise Developer Program and sign and build your project in Xcode. A simple 3 step process will have you ready to distribute your app straight from Xcode.
1. Create a Distribution Certificate
In order to distribute your iOS application, the Agent or Admin within your developer program membership will need to create a Distribution Certificate. This certificate is distinct from a Development Certificate and only this certificate will enable enterprise app distribution.
2. Create a Provisioning Profile
Distribution Provisioning Profiles are matched to your Distribution Certificate, and allow you to create applications that your users can run on their device. You create a provisioning profile for a specific application, or multiple applications, by specifying the AppID that is authorized by the profile. If a user has an application, but doesnʼt have a profile that authorizes its use, the user isnʼt able to use the application. Because these profiles are tied to your certificate when you revoke your certificate or it expires the application will no longer run on the device.
3. Sign and build in Xcode
Once you’ve installed your distribution certificate and provisioning profile, you’ll need to sign your code in Xcode. For more details on the code signing process, follow the step by step provided in the Developer Provisioning Portal.
More Details............... http://www.apple.com/business/accelerator/deploy/
Friday, January 3, 2014
Add a UITableView Header in iOS Application
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 20)];
UIImageView *headerImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"heade2.png"]];
//set your image/
UILabel *headerLbl = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, 205, 15)];
//set as you need
headerLbl.backgroundColor = [UIColor clearColor];
// headerLbl.text = [self.listOfHeader objectAtIndex:section];
headerLbl.text =@"Affrica";
headerLbl.textColor =[UIColor whiteColor];
headerLbl.textAlignment = UITextAlignmentCenter;
[headerImage addSubview:headerLbl];
headerImage.frame = CGRectMake(0, 0, tableView.bounds.size.width, 20);
[headerView addSubview:headerImage];
return headerView;
}
you can easily set height for header using this method.
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 50;
}
Subscribe to:
Comments (Atom)