RSSReader Version 2.0 with UITabBarController

Couple of months back I released an open source RSS Reader app for iPhone on GitHub. Most of the people who downloaded the source requested for an updated version using UITabBarController.

Today I am releasing version 2.0 with the following changes

  • Updated the views to use UITabBarController
  • Loads rss subscription from plist file
  • More fun to learn πŸ˜‰

Download RSSReader Version 2.0 with complete source for iPhone. To see complete list of changes visit RSSReader on Github

Note: This source code does not have any license nor warranty. Please feel free to use this in any of your projects and don’t have to email me.

Enjoy, Happy Coding πŸ˜‰

By Imthiaz

Programmer, SAAS, CMS & CRM framework designer, Love Linux & Apple products, Currently addicted to mobile development & working @bluebeetle

24 comments

  1. Hey, Thanks for this! Great work! I was wondering, how would you modify your code to show a one RSS feed, a “main rss feed” in the first tabBarController in a tableViewController with the navigationViewController detail pages in XCode4? Appreciate your sharing!

      1. Hi Thanks for the reply. I appreciate it. Would you mind explaining this a bit further? I got confused with how things would change since you are using the plist file to call all the tab bars and contents. I’m new to this stuff and trying to figure things out for myself. You probably won’t care to give instructions on it, but if you could it would help a lot. Thanks again.

        1. Hey, This is a small code which you edit in RSSReaderAppDelegate.m Please find the first line in this code and append in your project.

          #import "NewsListViewController.h"
          #import "RSSListViewController.h"
          
          UINavigationController * newsNavigationController = nil;
          
          //Create the view you want to push to the tab bar
          RSSListViewController * rssListViewController = [[RSSListViewController alloc] initWithRSSURL:@"http://burner.imthi.com/imthi"];
          
          //Create a new instance of navigationbar for that tab
          newsNavigationController = [[UINavigationController alloc] initWithRootViewController:rssListViewController];
          [newsNavigationController setTitle:@"Imthiaz Blog"];
          [newsNavigationController.tabBarItem setImage:[UIImage imageNamed:@"glyphicons_291_snowman.png"]];
          
          //Add that tab to the list of view controllers we are going to set for the tab bar.
          [viewControllers addObject:newsNavigationController];
          [newsNavigationController release];
          [rssListViewController release];
          
          

          I would suggest you read more about view controllers

          http://bit.ly/qwkVcL
          http://bit.ly/oiq3ck
          http://bit.ly/nc0S28

          Don’t worry this will take a little time to get it right. Once you crack it you will get around it faster πŸ˜‰ Hope this helps.

      2. hi, Imthiaz….!!!!
        i have seen the code for RssReader,
        is there any tutorial for explaining this code ,, please suggest me ,
        where to start , where to end???? i mean to ask you that , the flow…….

        thanks and regards from Keshav in advance….

      3. Hi Imthiaz can u send the detail steps of rss feeds source code to my mail id
        (rakipasumarthi@gmail.com)

  2. Also, it’d be really cool if you could show how to take the rss feed content, parse it, and display the content formatted onto a UIView. That’d be really great, instead of showing a UIWebView to an external website.

    Thanks again!

      1. Thanks for the useful information! I hope to see more code (and maybe some tutorials?) in the future. I’ve subscribed to your blog!

  3. hey..

    first: thank you for this, it is really great !

    well, im wondering how i can change the colour of the standart blue navigation at the top ?
    i spent hours.. but i dont get that to work.. πŸ™ im new to this, and i need some help.. i think it would be a very easy one for you.. πŸ™‚

    thanks a lot for your help – and sorry for my english, im not a a native speaker (as you might guess) πŸ˜‰

    1. HI Luke

      I am glad this code helped you. To change the color of the navigation bar is quite simple.

      In the file RSSReaderAppDelegate.m add this line

      [newsNavigationController.tabBarItem setImage:folderIconImage];
      [newsNavigationController.navigationBar setTintColor:[UIColor blackColor]];

      You can set any tint color you want.

      Hope this helps

      Cheers
      Imthi

  4. Would it be complicated to go from one of the icons on the tab bar directly to a UIwebview the way you have this built?

  5. Hi imthi,
    I’m trying to change the language of the “… more” button, but failed – I’ve spent some hours on finding a tutorial on this topic. Do you know, how to manage it?
    Thank you in advance for your help!
    Cheers,
    Stefan

  6. Hi there!
    Thanks for your great work!
    Do you know how to integrate a logo into the navigation bar?

  7. I’m looking very good tutorial as I can make the application to see entering the website of the original news bbc look either like my application to not see the BBC news?

    another question to be a rss required data base data base used for this example?

  8. Hi Imthi,
    Would u please tell me how you access the back button for the list view and browser view controllers? I have been spending lots of time trying to access the buttons to change it’s name to a standardized @”back” word. But all in all, thxx imthiaz, the rss reader worked great for me.

    Regards,
    -John-

  9. Ok it doesnt work. Sorry Imthi, could i please relive my first message again? I actually changed the foldertitle in the appDelegate.m. It works, but the header title also changed. Sorry.

    Regards n apologies,
    -John-

  10. sir can u pls post pdf viewer including bookmarks, search text, outline… also answer to me if we can use tab bar for pdf reader…. in iphone..

  11. Hello! I can’t seem to get your code to work.


    //
    // RSSReaderAppDelegate.m
    // RSSReader
    //
    // Created by Imthiaz Rafiq @hmimthiaz
    // http://imthi.com
    // https://github.com/hmimthiaz/RSSReader
    //

    #import "RSSReaderAppDelegate.h"
    #import "RSSParser.h"
    #import "NewsListViewController.h"
    #import "RSSListViewController.h"

    @implementation RSSReaderAppDelegate

    @synthesize window=_window;

    @synthesize tabBarController = _tabBarController;

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{

    self.tabBarController = [[[UITabBarController alloc] init] autorelease];
    NSMutableArray * viewControllers = [[NSMutableArray alloc] init];

    //plist file full path
    NSString * subscriptionListFile = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"RSS_Subscription.plist"];
    //Load plist file as dictionary
    NSDictionary * subscriptionList = [[NSDictionary alloc] initWithContentsOfFile:subscriptionListFile];
    //Get the folder array
    NSArray * subscriptionFolders = [subscriptionList objectForKey:@"Folders"];

    NewsListViewController * newsController = nil;
    UINavigationController * newsNavigationController = nil;

    //Create the view you want to push to the tab bar
    RSSListViewController * rssListViewController = [[RSSListViewController alloc] initWithRSSURL:@"http://burner.imthi.com/imthi";

    //Create a new instance of navigationbar for that tab
    newsNavigationController = [[UINavigationController alloc] initWithRootViewController:rssListViewController];
    [newsNavigationController setTitle:@"Imthiaz Blog"];
    [newsNavigationController.tabBarItem setImage:[UIImage imageNamed:@"glyphicons_291_snowman.png"]];

    //Add that tab to the list of view controllers we are going to set for the tab bar.
    [viewControllers addObject:newsNavigationController];
    [newsNavigationController release];
    [rssListViewController release];

    for (NSDictionary * folderDetails in subscriptionFolders) {

    NSArray * newsItems = [folderDetails objectForKey:@"Items"];
    NSString * folderTitle = [folderDetails objectForKey:@"FolderName"];
    NSString * folderIcon = [folderDetails objectForKey:@"FolderIcon"];
    UIImage * folderIconImage = [UIImage imageNamed:folderIcon];

    newsController = [[NewsListViewController alloc] initWithNewsSourceList:newsItems];
    [newsController setTitle:folderTitle];

    newsNavigationController = [[UINavigationController alloc] initWithRootViewController:newsController];
    [newsNavigationController setTitle:folderTitle];
    [newsNavigationController.tabBarItem setImage:folderIconImage];

    [viewControllers addObject:newsNavigationController];
    [newsNavigationController release];
    [newsController release];
    }
    [self.tabBarController setViewControllers:viewControllers];
    [self.window addSubview:self.tabBarController.view];

    [self.window makeKeyAndVisible];
    return YES;
    }

    - (void)dealloc{

    self.tabBarController = nil;

    [_window release];
    [super dealloc];
    }

    @end

    I keep getting syntax errors about how closing brackets and semicolons are expected. Any idea?

  12. Hi Imthi,
    I was wondering how do you actually create sub-folders? I want some of my rss views to separate sub folders withiin the main folder as well.

Comments are closed.