All Projects → nicolastinkl → TKDynamicRACTableView

nicolastinkl / TKDynamicRACTableView

Licence: other
Feed Table View

Programming Languages

objective c
16641 projects - #2 most used programming language
c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
Mercury
31 projects
shell
77523 projects
ruby
36898 projects - #4 most used programming language

TKDynamicRACTableView

Mou icon

image link http://images.cnblogs.com/cnblogs_com/tinkl/253133/o_2445FE59-4074-4301-B423-A362740C3FBC.png

Requirements

tinkl, is some of my experiences,hope that can help ios developers.make the word be better and easier

TKDynamicRACTableView uses ARC and requires iOS 7.0+.

It probably will work with iOS 6, I have not tried,but it is not using any iOS7 specific APIs.

Installation

just download zip file… > and you can use it .

Links and Email

if you have some Question to ask me, you can contact email [email protected] link.

or see blogs http://www.cnblogs.com/tinkl/

Some Code

Just see this:

NetWork with Get request:

- (RACSignal *)fetchPostsWithURL:(NSString *)urlString
{
    return [[self rac_GET:urlString parameters:nil] map:^id(NSDictionary *data) {
        return [[((NSArray *)data[@"moments"]).rac_sequence map:^id(id value) {
            return [[TKPost alloc] initWithDictionary:value error:nil];
        }] array];
    }];
}

Post request:

- (RACSignal *)fetchPostsWithPost:(NSMutableDictionary * ) params
{
    UALog(@"send json:  %@",params);
    return [[[[self rac_POST:@"http://api.petta.mobi/api.do" parameters:params] map:^id(id posts) {
        /*!
         *  reponse code 200
         */
        UALogFull(@" reponse code 200 ");
        if (posts) {
            UALog(@"response message : %@",posts[@"response"][@"response_msg"]);
        }
        if (posts && [posts[@"response"][@"response_code"] intValue] == 0) {
            NSArray * moments = posts[@"moments"];
            UALog(@"moments %lu",(unsigned long)moments.count);
            return  [[moments.rac_sequence map:^id(id value) {                
                TKPost * post = [[TKPost alloc] initWithDictionary:value error:nil];
                post.posttype = @"singleimage";
                return post;
            }] array];
        }else{
            /*!
             *  error  maybe network error
             */
            return @[];
        }
    }]  catch:^RACSignal *(NSError *error) {
        return [RACSignal error:error];
    }] replayLazily];
}

Data init :

  @weakify(self);
    [RACObserve(self, viewModel.post) subscribeNext:^(NSArray * posts) {
        @strongify(self);
        if (posts.count > 0) {
                    
            self.tableViewDataSource.posts = [posts copy];
            
            [self.tableView reloadData];
        }else{
            UALog(@"NO data");
        }
    }];

Features


  1. Gives Xcode's autocompletion to be able to filter like Open Quickly does2. Ordered
  2. Supports Xcode 5.0, 5.0.1, 5.0.2 and 5.1
  3. Supports Xcode's learning and context-aware priority system
  4. Uses Grand Central Dispatch to parallelise matching
  5. Productivity++

Notes


  • Only tested with Xcode 5 on 10.8.5
  • Hasn't been tested with other plugins

Changelog

1.1.0 - 2014/05/12

  1. Add ReactiveViewModel ,ReactiveCocoa , Objection.....
  2. Add (MVVM) . Mou icon
  3. Add JsonModel
  4. add UIView-AutoLayout

1.0.0 - 2014/02/04

Initial release

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].