Giter Site home page Giter Site logo

xhtwitterpaggingviewer's Introduction

image

TwitterPaggingViewer

A twitter like navigation bar, page viewer.

有某些业务中,并不是在NavigationController的rootViewController上使用,那么该怎么去改进这个库去适应呢? 还在考虑解决方案中...........

组件要求 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.

xhtwitterpaggingviewer's People

Contributors

daliborfilus avatar lerosua 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

xhtwitterpaggingviewer's Issues

UITableView goes under the navigation bar

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. how i can do?

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.

How to push from other View ?

Hello,

In you demo you are using XHTwitterPaggingViewer from start of the application (First View Controller) and declare in didFinishLaunchingWithOptions.

As I am doing below hierarchy in StoryBoard.
UINavigationController -> UIViewController -> UIViewController - > XHTwitterPaggingViewer

For this I am doing in ViewDidLoad of second VC

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];

XHTwitterPaggingViewer *twitterPaggingViewer = [storyboard instantiateViewControllerWithIdentifier:@"XHTwitterPaggingViewer"];

XHTableViewController *tableViewController1 = [storyboard instantiateViewControllerWithIdentifier:@"TableViewController1"];
XHTableViewController *tableViewController2 = [storyboard instantiateViewControllerWithIdentifier:@"TableViewController2"];

twitterPaggingViewer.viewControllers = @[tableViewController1, tableViewController2];

But i am getting crash

error

Please provide you feedback for this, how can I load from something inner view controller.

Auto Resizing Issue

XHTwitterPaggingViewer not resizing according to the orientation. Flexible height width is not helping.

how to may navigation bar transparent? Though I want its bar items to remain visible.

Hi, thanks for your great job here, but I found it's not easy to make the nav bar transparent.
I added following line into - (void)setupNavigationBar in XHTwitterPaggingViewer.m, but it did work, is any idea about this issue? thanks a lot.

[self.navigationBar setBackgroundImage:[UIImage new]
                         forBarMetrics:UIBarMetricsDefault];
self.navigationBar.shadowImage = [UIImage new];
self.navigationBar.translucent = YES;

About XMPP

Recently, my company want bunlid a iphone app about IM. i am a iOS development engineer , a rookie.

Should i build the XMPP servicer ? or is there someone else going do this ? Because i don' t know anything about this..... If the servicer was built. Then what should i do ?

[XMPPJID jidWithUser:(NSString *) domain:(NSString *) resource:(NSString *)] where do i get domain and resource ?
please help me...

How to use it with UIVIewCotroller instead XHTableViewController?

When I try to add two UIViewController instead of XHTableViewController gives me this error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull rangeOfCharacterFromSet:]: unrecognized selector sent to instance 0x10a083cb0'

Followed example project XHTwitterPaggingViewerStoryboradExample

UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;

twitterPaggingViewer = (XHTwitterPaggingViewer *)navigationController.topViewController;

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

ViewController1 *vc1 = [storyboard instantiateViewControllerWithIdentifier:@"vc1"];
ViewController2 *vc2 = [storyboard instantiateViewControllerWithIdentifier:@"vc2"];
twitterPaggingViewer.viewControllers = @[vc1,vc2];

screen shot 2014-11-23 at 12 33 27 am

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.