Giter Site home page Giter Site logo

twitterpaggingviewer's Introduction

image

TwitterPaggingViewer

A twitter like navigation bar, page viewer.

组件要求 Requirements

  • iOS 6.0+
  • ARC

Podfile

CocosPods is the recommended method to install TwitterPaggingViewer, just add the following line to Podfile

pod 'XHTwitterPaggingViewer'

and run pod install, then you're all done!

How to use

Easy to drop into your project. 类似UITabBarController的用法,非常方便。

XHTwitterPaggingViewer *twitterPaggingViewer = [[XHTwitterPaggingViewer alloc] init];
    
    
NSMutableArray *viewControllers = [[NSMutableArray alloc] initWithCapacity:7];
    
NSArray *titles = @[@"Home", @"Friend", @"曾宪华", @"News", @"Viewer", @"Framework", @"Pagging"];

[titles enumerateObjectsUsingBlock:^(NSString *title, NSUInteger idx, BOOL *stop) {
    XHTableViewController *tableViewController = [[XHTableViewController alloc] init];
    tableViewController.title = title;
    [viewControllers addObject:tableViewController];
}];
    
    
twitterPaggingViewer.viewControllers = viewControllers;

twitterPaggingViewer.didChangedPageCompleted = ^(NSInteger cuurentPage, NSString *title) {
    NSLog(@"cuurentPage : %ld on title : %@", (long)cuurentPage, title);
};
    
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:twitterPaggingViewer];

License

中文: TwitterPaggingViewer 是在MIT协议下使用的,可以在LICENSE文件里面找到相关的使用协议信息。

English: TwitterPaggingViewer is available under the MIT license, see the LICENSE file for more information.

twitterpaggingviewer's People

Contributors

kajinka13 avatar ponycui avatar xhzengaib 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitterpaggingviewer's Issues

Problem with scrolling in tableview

Hi,
i have tried to implement your project in my app, and i have notice that when i scroll to bottom the UITableView some elements go under the UITabBar, i have notice that this problem is also in your Example, as you can see in this image:

ios simulator screen shot 07 nov 2014 15 43 44

as you can see the last elements go under the tab bar, and also the scroll indicator go under the bar.
i have also notice that in XHTwitterPaggingViewer.m this line:

CGRect contentViewFrame = viewController.view.bounds;

return a width of 320 pixel for all device, also for iPhone 6 and iPhone 6 plus that have different width.

unrecognized selector

Hello I'm trying to use the library but I got this issue Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[newsPagerViewController topViewController]: unrecognized selector sent to instance
In this line

 newsPagerViewController *twitterPaggingViewer = (newsPagerViewController *)navigationController.topViewController;

newsPagerViewController is subclass of XHTwitterPaggingViewer and in storyboard I've embded newsPagerViewController in navigation controller.

circular scrolling ( 循环滚动 )

Hello, how active the circular scrolling? I tried some solution but it crashes constantly. scrolling.

喜,环状滚动怎么活跃?我尝试了一些解决方案,但它崩溃不断。

如何利用stroyboard实现tableviewcontroller的加载

首先我利用
XHTableViewController *tableViewController = [mainStoryboard instantiateViewControllerWithIdentifier:@"XHTVC"]取得了sb上的tvc,
然后想在XHTwitterPaggingViewer的数组属性里加入刚才取得的tvc,运行程序时候发现无法执行到XHTableViewController的m文件,为何啊?

exc_bad_instruction (code=exc_i386_invop subcode=0x0)

As mentioned in title I got that error , exc_bad_instruction (code=exc_i386_invop subcode=0x0), at this line

__weak typeof(self) weakSelf = self;

I tried to use __strong but didn't worked any solution to solve it ?

UITableView goes under the navigation bar with xib

Hello, i have tried your project and i have substitute the:

XHTableViewController *tableViewController = [[XHTableViewController alloc] init];

with a simple UITableViewController with xib, but the UITableview go under the UINavigationBar and the first two line are covered by the navigation bar, this is an example code:

NSMutableArray *viewControllers = [[NSMutableArray alloc] initWithCapacity:7];

NSArray *titles = @[@"Home", @"Friend", @"曾宪华", @"News", @"Viewer", @"Framework", @"Pagging"];

[titles enumerateObjectsUsingBlock:^(NSString *title, NSUInteger idx, BOOL *stop) {
    TableViewController *tbv = [[TableViewController alloc] initWithNibName:@"TableViewController" bundle:nil];
    tbv.title = title;
    [viewControllers addObject:tbv];
}];

twitterPaggingViewer.viewControllers = viewControllers;

how i can do?

添加uipagecontrol失败了 ~~

我现在在一个UIviewcontroller(这里就叫A吧)的基础上添加UIPageViewController成功了,可以实现滑动翻页了。
现在我想在A的上面再加一个UIPageControll(这里叫B吧)失败了,不知道为什么不显示?
以下是我的步骤:

  1. @Property (nonatomic,strong) UIPageControl *pageControl;
    @synthesize pageControl = _pageControl;
    2.在A的viewDidLoad里写:[super viewDidLoad];
    self.pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.view.frame.size.width, 40.0f)];
    self.pageControl.currentPage = 0;
    self.pageControl.numberOfPages = 10;
    self.pageControl.userInteractionEnabled = NO;
    [self.view addSubview:self.pageControl];
    (想先简单的显示出来,B上dots的实时移动先放一放)

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.