Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-26-2010, 05:33 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: MA
Posts: 126
nd049 is on a distinguished road
Post Twitter Feed in UITableView

Hey everyone,

I am trying to figure out how to get one twitter feed (that would be hard coded and wouldn't change per user) to show up in a UITableView (one tweet per cell). I've tried to find some kind of tutorial or any information on where to start, but I haven't been very successful at finding anything. If anyone has implemented something like this and can offer some advise or if you know of a tutorial that covers this, it would help me out a lot!

Thanks!
nd049 is offline   Reply With Quote
Old 04-27-2010, 01:22 AM   #2 (permalink)
Elegance is Infinite
iPhone Dev SDK Supporter
 
TapTouchClick's Avatar
 
Join Date: Jan 2010
Location: Bay Area, CA
Posts: 677
TapTouchClick is on a distinguished road
Send a message via AIM to TapTouchClick Send a message via Skype™ to TapTouchClick
Default

For your purpose. Google
Quote:
RSS Feed Reader iPhone Tutorial
all Twitter profiles have an rss. =) cheers
__________________
Our website
TapTouchClick is offline   Reply With Quote
Old 04-27-2010, 11:20 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: MA
Posts: 126
nd049 is on a distinguished road
Default

Do you know how would I make all of the text of the tweet fit in the whole cell? right now the text is still big and only displays part of the text.

Any ideas?
nd049 is offline   Reply With Quote
Old 04-27-2010, 01:02 PM   #4 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: UK
Posts: 1,896
harrytheshark is on a distinguished road
Default

Make a custom cell, there are a few tutorials online if you don't mind a bit of googling
harrytheshark is offline   Reply With Quote
Old 04-28-2010, 08:46 AM   #5 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: MA
Posts: 126
nd049 is on a distinguished road
Default

Thanks a lot! I have two more questions though. I now have my custom cells working properly, but at the end of the tweets it shows Thanks for the... | Facebook or something of that sort because it is often posted from facebook. I would like to get rid of that link each time at the end. I know I could use

Code:
stringByReplacingOccurrencesOfString:@"http://bit.ly/"
but that would only remove the first part of the link. So my question is: is there some method that removes a certain number of characters from the end of a string?

My second question is when i go to the twitter tab in my app it takes a second or two to load because it's parsing the rss feed. Does anyone know of a way to speed up that process so that there is less of a delay?

Thanks!
nd049 is offline   Reply With Quote
Old 04-28-2010, 09:28 AM   #6 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: UK
Posts: 1,896
harrytheshark is on a distinguished road
Default

You can use NSString's substringWithRange: to get a string with a certain amount of characters, look in the documentation for more information.

For the second question, run the parse in a background thread so the UI doesn't hang.
harrytheshark is offline   Reply With Quote
Old 04-28-2010, 10:06 AM   #7 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: MA
Posts: 126
nd049 is on a distinguished road
Default

Quote:
Originally Posted by harrytheshark View Post
You can use NSString's substringWithRange: to get a string with a certain amount of characters, look in the documentation for more information.

For the second question, run the parse in a background thread so the UI doesn't hang.
I don't have much experience with threading do you know of a good tutorial?
nd049 is offline   Reply With Quote
Old 04-28-2010, 10:19 AM   #8 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: UK
Posts: 1,896
harrytheshark is on a distinguished road
Default

The simplest example is something like:
Code:
- (void)startBackgroundTask {
	
	// interact with UI if necessary (start a progress wheel)
	
	[NSThread detachNewThreadSelector:@selector(backgroundTask) toTarget:self withObject:nil];
	
}

- (void)backgroundTask {
	
	NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]
	
	// do the background task
	
	[self performSelectorOnMainThread:@selector(backgroundTaskDone) withObject:nil waitUntilDone:NO];
	[pool release];
	
}

- (void)backgroundTaskDone {
	
	// interact with UI if necessary (stop a progress wheel)
}
harrytheshark is offline   Reply With Quote
Old 04-28-2010, 10:57 AM   #9 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: MA
Posts: 126
nd049 is on a distinguished road
Default

Quote:
Originally Posted by harrytheshark View Post
The simplest example is something like:
Thank you so much!!! That worked perfectly for what I need it for!

Does anyone have an idea what the date of post element of an twitter rss feed is called? I tried "date" and "created_at" but neither seem to work. What i did was:

Code:
if ([currentElement isEqualToString:@"title"]) {
		[currentTitle appendString:string];
	}
	else if ([currentElement isEqualToString:@"created_at"]) {
		NSLog(@"found date!");
		[currentDate appendString:string];
	}
If you have any experience with this the help would be appreciated!

Last edited by nd049; 04-28-2010 at 11:53 AM.
nd049 is offline   Reply With Quote
Reply

Bookmarks

Tags
twitter, uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 320
21 members and 299 guests
Abidullah, baja_yu, cgokey, Domele, Duncan C, Fstuff, gbenna, givensur, guusleijsten, HowEver, iphonedevshani, jbro, JoeRCruso, mdpauley, n00b, newDev, seokwon lee, SLIC, stanny, Steven.C, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,112
Posts: 402,876
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:36 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0