Xcode - How do you create an Activity Feed? - objective-c

I'm having an issue finding information on creating an activity feed in Xcode. I am new to developing so I'm trying to find something that really breaks things down. I'm looking to create a feed similar to twitter. Does any one know what my first steps should be? or at least a tutorial I could be referred to?

Well an activity feed is at its heart a list of "posts". So first learn how to make lists. Act I is making a UITableView with custom cells.
For the basics, see this tutorial and Apple's own Table View Programming Guide. If you want a book, I recommend the Big Nerd Ranch book "iOS Programming: The Big Nerd Ranch Guide 4th Edition". Chapter 8 is all about UITableView.
Ignore the default Apple layouts, which don't look much like an activity feed yet. Once you get past the basics you'll make your own cells.
Once you've mastered the basics, focus on custom cells, as the Apple defaults won't cut it for your hot new activity feed. Here's a tutorial for custom cells.
Ray Wenderlich also has a pretty in depth series of articles you can use to drill deeper in any specific areas of interest: UITableView articles.
Then, you've got to get data into your newsfeed somehow. This is Act II. Presumably this will begin as JSON from a REST web service. So you need to connect to a web server, parse JSON, and get Objective-C classes out the other side, ready to pass to your table view.
Learn the basics of Cocoapods, then use it to install AFNetworking and Mantle.
Use AFNetworking to retrieve JSON from whatever URL, then use Mantle to parse it. I found this tutorial useful for getting started with Mantle.
After that, you should have your first activity feed!

Related

MapView look for Places

I have a UIMapView in my iPhone-app.
First I want to show streetnames on it.
Second I want to give the user the chance to look for places with an UISearchViewController.
Are there any tutorials for these 2 points and which service do you think is the best for finding places?
You need to explore and understand Apple's MapKit Framework (https://developer.apple.com/library/ios/documentation/MapKit/Reference/MapKit_Framework_Reference/_index.html). To show stuff on the Map you can use MKAnnotations and MKLocalSearch to get points of interest around the user's location. The Documentation is super clear and has examples on how to get latitude/longitude, drop pins, pin-point user's location, add balloons with info (MKAnnotations), etc. Also, take a look at UISearchViewController documentation to see if it is the best for your use case.
Then, I would suggest you to take a look at Google Places Search API (https://developers.google.com/places/documentation/search) or Foursquare's API (https://developer.foursquare.com/docs/). At the end everything is about showing the info coming on a JSON response from one of the APIs on a List or on the Map with balloons.
If your data source ends up being Google Places... I would suggest you to use Google Maps for iOS instead of the native MapKit.
As for tutorials, there are probably 100s of them in the Interwebz... but I suggest you to start with Apple Documentation on MapKit understand that first and then try to mix it with other data sources.
Good luck and happy holidays!

How to add 'favorite' button in ios app

I am new to ios dev and in middle of app. I need to add button in my app which pops up two cells 1) Add to favorites 2) Show favorites.
The content needs to be added is simple string and same for show favorites.
I searched few answers but could not easily grasp.
Can someone explain the approach I should take?
You need data serialization, and/or persistance.
Small amount of data = Data Persistence.
Large = Serialization, aka Archiving. All arrays can do it, find some wenderlich tutorials.
(I can't seem to find any basic tutorials on his site or I'd link one here, all of it is kinda advanced database stuff)...
These keywords should be enough to get you going on yahoo or www.DUckDuckGo.com (doesn't personalize results, I try to get "pure" results when searching myself)

Need general directions to the idea for 'Bookshelf' app - table or scroll?

I'm currently stack at creating an app.
Our requirement is to make "book viewer" app similar to the iBooks. Each of the book is just series of images (JPEG or PNG) and not a pdf. So it's more like an image viewer in a sense.
The main view is going to be like "horizontal tableview", which the user can scroll horizontally the covers of the books, click it to download and open the book (which led to another page view). The row for the cover should be at least two since there's two "type" is set for the books. This part is more like a "pulse-style" bookshelf with UI similar to this.
When I thought of how to implement this behaviour, I found the way with UITableView just as described here. However, as an objective-c beginner, it's little complicated for me to use this, and our requirement has also each "cell" must have multiple buttons to set each book as "favourite" or "downloaded" etc... and this could be more complicated if I choose to use the UITableView.
So I came to think of using UIScrollView to line up the book covers, embedding each cover as an UIImageView with buttons. But I really don't know if this is the right direction, sicne the UIScrollView has no "reload" function, and the requirement also stated that the user should be able to find the books by using "search bar" at the head of the bookshelf view.
As you can see, I'm completely confused and depressed because I don't know how can I achieve this. I searched around google and several answers here at stackoverflow suggest using AQGridView or EasyTableView. They are both great, but again too complicated to implement these into our requirement...
Which way, or how should I implement this dynamic "pulse-style" bookshelf like feature?
I think my question is a bit vague, but I'm also not clear what to ask here because I really don't know how to do this. The Android version of this app is already achieved this requirement with fairly simple and easy to understand codes (since I have some experience in Java), but for this Objective-C, everything seem needlessly complicated...
Any help would be appreciated.
Thank you.
<preachy>The fact is that you have made a mistake by trying to make this app with a complex interface full of non-standard UI components when you are “an objective-c beginner”. I understand that this may not have been your decision; it may have been forced on you by the guy that signs your paychecks. Nevertheless, it is not reasonable to expect that you can just implement this app before you've spent the time working through tutorials and reading documentation for the programming language and libraries required to build it. We all have to learn the alphabet before we can start writing limericks.</preachy>
That said, if your app can require iOS 6, and you can take the time to learn a bit of Objective-C and iOS programming, it sounds like this would be pretty easy using UICollectionView. Apple did a couple of sessions about this powerful new class at WWDC 2012. I recommend you watch the videos:
Session 205 - Introducing Collection Views
Session 219 - Advanced Collection Views and Building Custom Layouts
You can also easily find some tutorials about UICollectionView using your favorite search engine.
Take a look at Collection View's
You can even download some sample code to see how a grid layout can be accomplished.

Sencha touch app building

I was put in charge of learning this and well I have read and tried to understand it all. I am lost in how to get it started and optimized. I need to achieve a window at startup that is menu based and takes you to different components. I think I have the photo galleries sorted out just now sure how to link to the startup window.
examples
I used this tutorial when I was trying to learn - http://miamicoder.com/2011/writing-a-sencha-touch-mvc-application/
The learning curve is quite steep but once you understand it it's a really good bit of kit to know your way around.
If you don't already understand the MVC (Model View Controller) architecture then it's going to be a bit tricky but the tutorial explains it all pretty well.
My advice would be start following the tutorial. Stick to it, get it working and THEN adapt it.
Good luck.
With Sencha Touch 2, the team have created a bunch of guides which hopefully help ease the pain when trying to learn the framework.
I suggest you first take a look at the Getting Started Guide, and then move onto the Building your first App Guide. These both should give you a kick start on where to start.
After that, I would definitely recommend you take a look at the code of their various examples, and then try modifying it. When I was first learning the framework (and JavaScript in general) I found that taking existing code and modifying it was definitely the easiest way of learning. Obviously this varies from person-to-person, but it is always a good step.
Much of their documentation have previews and examples which you can actually edit the code inline, which I have found very useful in the past. You can view an example of this here.
The Touch Forums are very active. Almost all topics get responded to within hours, and I have never seen a post which was never responded to.

ipad programming guidance

I'm just at the startup level in ipad/iphone programming. There is a project in my mind, but I need some guidance on key points:
fundemental requirements:
1)user interface and interaction like wired magazine app(playing movies on page,etc)
2)accessing the timeuser spent on pages and videos
more:
-accessing another application's data (and let's say that application can give permission, if there is so)
Maybe these are just easy things to figure out, but if you could point me where to look I would be pleased.
PS: I have more than 10+ top seller ebooks on ipad/ios/iphone programming and I'm started to reading them. To be clear, names of these concepts (in what way I should research accessing the time user spent on a page- I did try on google on my own words but could not get the desired result)or some material pointing the issues really ease my way.
The UI portion of your question should be pretty easy to get to, it will just take learning a lot of the Cocoa Touch library, probably even a bit of Core Foundation.
There are two books I highly recommend:
Programming iOS 4
iPhone Programming: Big Nerd Ranch
I strongly recommend Programming iOS 4, primarily because it has been updated for XCode 4.
To answer your other question: to the best of my knowledge, you are not allowed to access other application's data due to sandboxing. You can, however, share data between your own apps if they share the same App ID.
First, as to the question on sharing data between apps. You can pass data between apps - basically launching one app from another and passing arguments. This can go both ways. If this is what you want, I'll share more on that.
As to learning, I recommend devouring Apple's documents, their samples, and Stackoverflow. Most of the iPhone development books you come across on development will be useful.