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

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.

Related

Framework of choice for building smart histogram in cocoa touch

I'm familiar with the basics of objective-c and cocoa touch and I want to start now my first large iOS project.
I want to build an iPad app with a histogram like you know it from several photo apps where you can see e.g. the distribution of brightness in a picture. But it needs to be smart, i.e. scrolling horizontal, setting borders and pinching for zoom-in and zoom-out.
Is it possible to handle this requirements with iOS7 standard API or do I need a 3rd party framework like Core-Plot to achieve a histogram I described, and if so, which one would you prefer and why.
Thanks for your help!
Is it possible to handle this requirements with iOS7 standard API or do I need a 3rd party framework
It's certainly possible to do it all yourself with no help from anybody except the frameworks that Apple provides. Whether that's the best solution for you, only you can decide. I think these are the relevant considerations:
You seem to have some fairly specific requirements and it sounds like you may need fairly fine control over exactly how this histogram looks and works. These are good reasons to create the histogram yourself.
You're still fairly new to Objective-C, Cocoa Touch, etc. That's a good reason to look for something that's already written. You'll save a lot of time and frustration, but you may have to be a little more flexible in terms of what you're willing to accept; it's unlikely that anybody has already written exactly the thing you want.
I'd suggest taking a shot a building what you want, and if it turns out to be a bigger thing than you're ready to tackle, you'll at least have a better understanding of what's involved.
To get started, read up on UIBezierPath. All you really need to do is to create a view that accepts an array of numbers and draws the corresponding graph. Don't worry about zooming and scrolling yet, just make a view that draws the graph. Once you have that, you can read up on UIScrollView, which will give you the scrolling and zooming with almost no work.

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.

Create swipe controlled simple flipbook style animation in ObjC

I am a beginner in Obj C development, though quite experienced (over 10 years) with other ECMAscript based languages and OOP development.
I want to build a simple flipbook style animation, controlled through swiping motion. I'm sure extremely simple for any advanced ObjC coders.
Can anyone with extensive ObjC-CocoaTouch experience give me some higher level recommendations?
ie,
1 -general application design, should I start with a simple view based application, or navigation based or?
2 -should I use 3rd party animation frameworks such as Cocos2D, or stick with built in classes and methods?
3 -if using built in methods, classes, what is the recommended way of achieving a animation, that will be controlled via swipe and touch gestures?
4 -I want to eventually have multiple 'flipbooks' that I can 'instantly' swap with one another, ie to give the net effect of an object changing color, etc, but not sure how to approach this from a memory management point of view, related to #1 above
Except for point 3 above, I'm not expecting any actual code examples. Just general guidelines to follow and perhaps, what are some next steps I should take in my goal as an ObjC code samurai.
While I am no expert I can think of a few things you could pursue to get the effect you want. Sounds like you want have a somewhat immersive experience for users. Cocos2D would definitely fit that bill. Me and my team at Get Set Games have been using it for the past year and have not been dissapointed with it. We haven't done the flipbook effect you speak of but quite possibly someone in the Cocos2D forums has implemented are at least attempted this. Forums are accessible here.
Having said that I think starting with the iPhone SDK UIKit framework and basic examples that come with it are great. There is a great array of samples on scrolling, swiping, etc. If you want to hook in Cocos2D or other frameworks later that's definitely an option.

What is something you wish you had known sooner about the iPhone SDK?

I'm interested in picking up some tips and tricks while learning about the SDK. What I am looking for something that you wish you had known getting started that would have benefited you now.
don't use a DOM parser, but a SAX parser. (Memory issues / speed).
if you use custom table cells, don't add too many views. (Slow scrolling issues)
if you add views to table cells, like labels, you may want to make their background opaque.
the generated table view code defeats the MVC paradigm. Think about your data model, and implement an UITableViewDataSource. Really.
One of the things I wish I knew at the very beginning was how to download data in a non-blocking way, specifically using NSURLConnection. The first versions of my apps suffered somewhat because I was using things like dataWithContentsOfURL:, which isn't a great idea on the iPhone, since you're never really sure what the network environment will be like for your users. To make it worse, I was testing over a fiber connection at home with an iPod touch, when a large number of my users were using Edge on their iPhones.
If you want to use SQLite, go with either Core Data (available in 3.0) or FMDatabase (Flying Meat). My first two apps, I wrote a customer wrapper and bound directly to SQLite. I am currently using FMDatabase with a new application and have found the experience much nicer.
In the case of a lot of developers, including Google, I'm sure they wish they knew their app would be rejected once complete.
CoreData Bindings is not supported on the phone.
Use the Clang Static Analyzer
http://clang-analyzer.llvm.org/
It's great for finding reference counting issues -- I have never seen a false positive.
Regarding the table view speed check out Loren Brichter's blog post http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/

How hard Is to add Iphone OS 3.0 features to an openGL game

I'm programming this game in OpenGL, mostly working inside an single EAGLView (I'm not that familiar with Views and other Cocoa concepts, my work to this point only involved using OpenGL to draw my game and calculating the logic myself).
I'm being told for adding a ton of features:
Send mails to Your friends when You achieve certain objectives in the game.
Interact with facebook ( I'm being told that I will provided with all the libraries I need).
Interaction with store kit !, buy weapons, Items, etc..
I would like to know, how effort and time will take to add those features... It's complicated to use GameKit ..StoreKit..MediaPlayer and other frameworks ?, considering that I only have worked with OpenGL to this point ?
Short answer: no, it's not hard to add those features.
Longer answer: depending on your background, if object-oriented concepts are new to you, it may take you longer to learn how to use the objects and frameworks. The only thing you can really do is read over the documentation and look at tutorials and decide how complicated it looks. Really, though, it's all well designed and thought out and if you have a programming background, a couple of the examples should give you plenty to start with and you'll get it all soon. And then come on back with your specific questions and smarter devs than I will answer them.
The hard part is all the details: weapons, items, etc.