Friday 18 December 2015

How To Select Multiple Images From Gallary In Asset Folder Ios/Iphone

#import <CTAssetsPickerController/CTAssetsPickerController.h>


// request authorization status
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status){
    dispatch_async(dispatch_get_main_queue(), ^{

        // init picker
        CTAssetsPickerController *picker = [[CTAssetsPickerController

alloc] init];

        // set delegate
        picker.delegate = self;

        // Optionally present picker as a form sheet on iPad
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
            picker.modalPresentationStyle = UIModalPresentationFormSheet;

        // present picker
        [self presentViewController:picker animated:YES completion:nil];
    });
}];

- (void)assetsPickerController:(CTAssetsPickerController *)picker

didFinishPickingAssets:(NSArray *)assets
{
// assets contains PHAsset objects.
}



NSArray *assets = @[asset1, asset2, asset3, ...];
CTAssetsPageViewController *vc = [[CTAssetsPageViewController alloc] 

initWithAssets:assets];
vc.pageIndex = assets.count - 1; // display the last asset

[self.navigationController pushViewController:vc animated:YES];

more Detail Visie Below Link :-

https://github.com/chiunam/CTAssetsPickerController

Wednesday 16 December 2015

How To Set Margig Header TableVIew Ios/Iphone

UITableView has a delegate method named "viewForHeaderInSection"

. If you remove the padding an then in the delegate method
  add a padding and return the section header view.

- (UIView *)tableView:(UITableView *)

 tableView viewForHeaderInSection:(NSInteger)section{
    UIView *view = [[UIView alloc]

 initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.frame), 30)];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(15, 5, 200, 25)];

    // 15 pixel padding will come from CGRectMake(15, 5, 200, 25).
    label.text = @"2013";
    [view addSubview: label];
    return view;
}

Thursday 10 December 2015

Work with CollectionViewCell in TableView IOs/Iphone

=> Here Used CollectionView The Using TableView In Ios
   And Used How to Perfomnce About    Using emded and ColllectionView And
   TableView Both Concept And level of The Basic Api :


- (NSInteger)tableView:(UITableView *)tableView

   numberOfRowsInSection:(NSInteger)section
{   
    return [self.articles count];
}


=> Her Used CellForRowAtIndex Path In TabeView And

    Used Delegate Method And Data sources



 - (UITableViewCell *)tableView:(UITableView *)tableView

 cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellIdentifier = @"ArticleCell";

    UITableViewCell *cell = [tableView

dequeueReusableCellWithIdentifier:cellIdentifier];

    if (cell == nil)
    {
       cell = [[[UITableViewCell alloc]

initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]

autorelease];
    }

    cell.textLabel.text = @"The title of the cell in the

table within the table :O";

    return cell;
}





Monday 7 December 2015

How To Add Multiple Line Ios/Iphone

button.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
// you probably want to center it
button.titleLabel.textAlignment = NSTextAlignmentCenter; // if you want to
[button setTitle: @"Line1\nLine2" forState: UIControlStateNormal]

 button.titleLabel.lineBreakMode = UILineBreakModeWordWrap;
// you probably want to center it
button.titleLabel.textAlignment = UITextAlignmentCenter;
[button setTitle: @"Line1\nLine2" forState: UIControlStateNormal];

Wednesday 2 December 2015

Work With KVO In Ios/Iphone

==> here used Kvo Key value obbserver:
- (IBAction)incNumber:(id)sender

{
    self.number++;
    NSLog(@"%d", self.number);

}
- (void)addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:
  (NSKeyValueObservingOptions)options context:(void *)context;