Giter Club home page Giter Club logo

basekit's Introduction

BaseKit is a set of IOS class to make your life easier.

Attention

CellMapping and FormMapping is removed from BaseKit, because it's too big to maintain. CellMapping is now called TableKit.m and FormMapping is called FormKit.m.

Installation

You have two way to do that

  • Copying files.
  • Install using CocoaPods.

Copying files

Add Code dir or pick library that you need inside Code/*.

Install using CocoaPods.

dependency 'BaseKit/Core', '~> 0.2.5'
dependency 'BaseKit/View', '~> 0.2.5'
dependency 'BaseKit/CellMapping', '~> 0.2.5'
dependency 'BaseKit/LocationManager', '~> 0.2.5'
dependency 'BaseKit/FormField', '~> 0.2.5'
dependency 'BaseKit/FormMapping', '~> 0.2.5'

Tutorials

Create iPhone and iPad IOS FORM with BaseKit

UITableView Dynamic cell mapping like Restkit

Core

Perform operation in background.

[BKOperationHelper performBlockInBackground:^{
    // Do your operation in background
} completion:^{
    // Update UI in main queue
}];

Iteration.

[BKIteratingHelper iterateTil:4 usingBlock:^(int number) {
    NSLog(@"%d", number);
}];

View

Present modal view controller with block.

[self presentModalViewControllerWithBlock:^UIViewController *{
 	return [[AnyViewController alloc] init];
} animated:YES];

Push view controller with block.

[self.navigationController pushViewControllerWithBlock:^UIViewController *{
    return [[AnyViewController alloc] init];
} animated:YES];

Cell mapping

Cell mapping has moved to TableKit.m.

Form mapping

Form mapping has moved to FormKit.m.

LocationManager

Easy to use CoreLocation manager with block or default delegate.

BKLocationManager *manager = [BKLocationManager sharedManager];

[manager setDidUpdateLocationBlock:^(CLLocationManager *manager, CLLocation *newLocation, CLLocation *oldLocation) {
    NSLog(@"didUpdateLocation");
}];

[manager setDidFailBlock:^(CLLocationManager *manager, NSError *error) {
    NSLog(@"didFailUpdateLocation");
}];

[manager startUpdatingLocationWithAccuracy:kCLLocationAccuracyHundredMeters];

ARC Support

BaseKit is fully compatible out of box with both ARC and non-ARC project.

Changelog

  • 2012/06/02 (0.2.4)

    • Fix FormMapping value saving bug
  • 2012/05/17 (0.2.3)

    • Fix cell mapping editing style bug
  • 2012/05/12 (0.2)

    • Added LocationManager
    • Added FormField
    • Added FormMapping
  • 2012/01/29 (0.1)

    • Initial release.

App using BaseKit

If you use BaseKit I'll be happy to add your app name here.

LiègeExpo2017

Contact

Bruno Wernimont

basekit's People

Contributors

brunow avatar lexrus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basekit's Issues

[BKDynamicCellMapping] async assign image to cell using dynamic cell mapping

If I have no image locally, and want to load image from Url. What can I do to assign the image in cell mapping's block?

[BKDynamicCellMapping mappingForObjectClass:[Item class] block:^(BKDynamicCellMapping *cellMapping) {
    [cellMapping mapKeyPath:@"imageUrl" toAttribute:@"imageView.image" valueBlock:^id(NSString *url) {
       // how to load image async here and assign to uiimage view
    }];
}];

Doc

Add more doc

Build an object mapper

Build an object mapper similar to RestKit. But instead of write own CoreData and network classes, use MagicalRecord and AFNetworking.

reloadRowsAtIndexPaths when NSFetchedResultsChangeUpdate

please add reloadRowsAtIndexPaths to below case:

  • (void)controller:(NSFetchedResultsController *)controller
    didChangeObject:(id)anObject
    atIndexPath:(NSIndexPath *)indexPath
    forChangeType:(NSFetchedResultsChangeType)type
    newIndexPath:(NSIndexPath *)newIndexPath {

    UITableView *tableView = self.tableView;

    switch(type) {
    case NSFetchedResultsChangeUpdate:
    [self cellForRowAtIndexPath:indexPath];
    [tableView reloadRowsAtIndexPaths:[tableView indexPathsForVisibleRows]
    withRowAnimation:UITableViewRowAnimationNone];
    break;
    }
    }

Podspecs Broken?

Today when I do a 'pod install' on one of my projects with BaseKit as a dependency, BaseKit gets omitted from the install. This did not happen last week though. I am not really sure what happens. I have tried it with a brand new project. Same problem. Any advice please?

Thanks,

Norsez

Build a form mapper

Configuration will be similar to cell mapping. With any object you would be able to create a table view with form fields.

BKLocationManager memory leak on Line 54?

Hi there
The LocationManager with blocks work beautifully, but when i analyze the app, it shows there might be a potential leak in line 54 of BKLocationManager.m

return [[self alloc] init];

I wonder if this is a false error, or is it safe to change it to [[[self alloc] init]autorelease]

Thanks

AppleDoc

Build a script that generate appledoc

titleForHeaderInSection for BKManagedTableModel

This is missing from BKManagedTableModel.

  • (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
    int count = [self numberOfSections];
    if (count > section) {
    id sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section];
    return [sectionInfo name];
    }
    return nil;
    }

Testing

Change to Kiwi testing and add more test

Website

I bought the domain basekit-framework.org, so build a simple website that introduce the project and store the documentation (appledoc)

replace accessory image at onSelectRowWithBlock NOT working

The new image is not replaced when row is selected. The following block has been executed as expected.

[cellMapping onSelectRowWithBlock:^(UITableViewCell cell, Item *item, NSIndexPath *indexPath) {
UIImageView
accessoryView = (UIImageView *)cell.accessoryView;
UIImage *newImage = [UIImage imageNamed:@"Images/unchecked.png"];
[accessoryView setImage:newImage];
}];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.