Framework of choice for building smart histogram in cocoa touch - 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.

Related

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.

Suggestions about 2D in a "risk"-like game for iOS

The idea of programming a risk-like game for iOS has been around my mind for more than a week, so I thought I should do something about it. I'm not an experienced iOS developer (I haven't done a real project, only tutorials), but I got some notions about both the language and Cocoa Touch.
So, the thing I want to do is a board game, similar to dicewars (see http://www.gamedesign.jp/flash/dice/dice.html). The maps will at some point have hexagonal-tiles, but if it is to much pain for starters, I don't have a problem with regular tiles for the beginning. I want the maps to be dynamically generated, not made in advance. There won't be much on the game screen : the map, divided in areas, the dices, and a HUD.
The main thing I'm grasping with right now is what to use to do the graphic stuff. I have no background in game programming, and very limited in 2D. For my purposes, should I go with Core Graphics/Animation, OpenGL, Cocos2D, or something else ? I would like to avoid starting with a technology, and halfway through the project, realizing another would have be more adapted.
I'm also listening to any advice about game dev in general, map generation, IA programming.. etc. If you have links that answers my question, feel free, I haven't found anything conclusive so far
tl;dr:
I'm wondering how should I do 2D for a simple board game similar to dicewars/risk. No need for collision stuff, just something to draw a map, update it, and display a hud.
Thanks for your time!
I'd suggest Cocos2d: Very easy to get started, has more than enough functionality to cover your requirements (including tile-maps built into the engine), has an active community, and has been the framework used by many successful games.

What's the best way to use OpenGL with Cocoa?

I've been trying to create a Cocoa project that uses OpenGL. NSOpenGLView is too restrictive for my needs, so I've created my own custom NSView subclass. I need to have multiple copies of this class on screen at once. And I need to use shaders.
What's the best way to organize this sort of project? I've tried a ton of different setups, but I always seem to wind up having invalid drawables, GL errors, trouble managing contexts, etc. Is there a simple way that I'm overlooking? Maybe setting up a single context at app launch and having all views share it?
Stay away from messing with OpenGL yourself...it sucks. Just say no.
I HIGHLY recommend using Cocos2D. Its a FANTASTIC graphics library that is highly supported and documented and handles all the OpenGL nonsense and makes the pain go away. Don't touch OpenGL unless you want to spend more time dinking with technical details than actually making your project happen.

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.

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.