Best UI element for displaying results of XML parsing - iphone

i am a student and also new to iphone SDK.i want to do xml parsing which has image URL and Data,it is a XML file about news.i have to show it .can i use table view or navigation controller? which is the best way?i have to show images and titles in first page.when i click it,it shows other page to show full news with image. is there any tutorial for what i need?

Table View and Navigation controllers are two entirely different things. It's like asking whether you should use a hammer or a nail to hang something. You could use both. YOu could also use a screw and a screwdriver, or any number of other ways to hang something on the wall.
A Navigation controller allows you to move around in a view heirarchy. See the Apple Contacts app to see how you can move around. Now, if you want to have a list of items, then you could use TableView to make a table of items. You don't have to have a UITableView inside a Navigation controller view. Or you may want to.
I would start at Apple's Creating iPhone Apps, and then go look at the Stanford's online course, and this one, among countless others.
You have chosen to bite off quite a big chunk with your first project.

Related

Application walkthrough when opened for the first time

How do you setup in your application to show little bubbles with text and block the rest of the screen from being used and only allow a small section / button to be pressed. I am wanting to create a walkthrough to show users how to use the application and where to find things within the application when it is opened for the first time.
I would like to dim the rest of the application except for the part I want them to click on. Is there a framework already with these features?
There's no frameworks that provide this functionality, as far as I know.
One way you could do this though is to have a set of overlay images which you overlay over the whole screen the first time the user goes to that screen. To determine if the user has already been to a screen, I suggest you look at NSUserDefaults. To create the overlay images, I'd make the image the full size of the screen (i.e. 460x320 if you are showing the status bar) and then have transparent sections where you want to "see through" to the element below. Add a gesture recogniser to the overlaid image view to detect a tap and then hide the image and set the flag in NSUserDefaults to make it not happen the next time the user goes to that screen.
If you don't get a better answer, you could look at MAAttachedWindow on the page at this link. It's written for Cocoa, not Cocoa Touch, so you would have to convert it. I am considering doing this myself. You might find it to be worth the trouble, but I haven't looked at every detail, yet, so I couldn't say for sure. There are only tow files that are involved (.m and .h).

How to Display Two Scrolling TextViews At Once

I'd like to display two windows on screen with scrolling text in them e.g. top window will have one bible translation while the bottom view would have another.
Ideally, I'd like them to stay in sync so they're both showing the same point in their respective translations (i.e. switch to John Ch1 in top view, bottom view follows and does same). But for now I'm just curious how to get these into two seperate viewable windows.
Any ideas?
In all honesty, I dont think you have the screen space to do this for the iPhone in such a way that is visually comfortable for the user.
That aside, the best method would depend on how the rest of your app is built. You can create a view that contains two UITextViews in it, each taking up roughly half the screen. You should be able to scroll one as a response to the other scrolling, though I haven't done this, so I cannot tell you how to do it exactly.
Another option that you have is to use a main UITextView, and then a second UIModalView that is overlaid above it. It all depends on the app structure.
Just to note, unless you have specific markers for points of translation, it would be very hard to have them sync up in that way. You could try to match line numbers, or something like that, but due to languages being so different, one might take 3 lines, and a translation might take 4 to say the same thing.
This is a fairly basic question, so you should perhaps revisit the iOS Application Programming Guide, but in a nutshell, you'd have two UITextView elements inside a view in your application, and you can synchronize between them using the built in setter method
- (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
You have two needs here:
(1) You need to create a data model that can hold the translations and link each chapter and verse in each translation to the chapter and verse in all the other translations. For that, I would suggest learning Core Data. Be prepared to spend some time learning it.
(2) You need to display the translations. For this I would suggest you use two UITextViews in the same containing view. However, as Karoly S noted, there really isn't room on an iphone screen for two text views. I would recommend using two views connect by a flip transition which will allow you to have one translation on a full screen and then flip over to the other translation. The user could flip rapidly back and forth to compare.

Navigation based iPhone app using thumbnails

I've been searching the internet for quite some time and didn't find anything useful.
I want to make a basic app for the iPhone using simple views and hierarchical data nothing too fancy. The only problem is that I can't seem to find any tutorial that makes the first/main view like a thumbnail gallery that leads to other views.
To clear it a bit up:
I want my first view to be a 2D array of thumbnails and a little text below each of these thumbnails. When I click on a thumbnail it takes me to a sub-view containing more detailed info and options.
So is there any relatively painless way to make something like this using Table Views or something like that or do I have to make a custom view with methods to populate it as my heart pleases.
Please take note that I want to avoid any third party libraries like Three20 or similar.
Thanks
Just to make sure I understand, you want to make an application that acts similar to the Contacts on the iPhone? In other words, a list that when an item is clicked will take you to a new view with detailed information about the clicked item? But in your case, you want an image next to/above the text?
In either case, you will want to use a tableView. If you want an image beside the text, just set the imageView.image property of the cell to a corresponding image. If you want a different layout, however, you will need to create your own custom UITableViewCell, which is not a hard task at all. Here is a tutorial on how to create a custom cell using IB. It can also be done programmatically if you prefer to do it that way. I hope this helps to solve your problem.

Changing views iphone

this is a very noobie question although I have had quite a bit of experience iphone development.
I have a client who wants an app with various screnns, but does not want to use built in iphone navigation, but instead wants to have buttons on the screens. All I can find is a load of 14 year olds giving tutorials on MVC or using different views in the same nib.
Does anybody know what apples suggested way of doing this is as I can imagine it been a mind field.
Many thanks
Maybe you should have followed the MVC tutorials of the 14 year old guys.
Then you would know that you could use the built in iphone navigation controllers (ie UITabBarController, UINavigationController) without their standard view counterparts (ie UITabBar, UINavigationBar).
You could always just draw buttons on the screen in interface builder and use custom images for the normal/highlighted states.
When the button is pressed it's up to you what you'd like to do with the received buttonclick method being invoked... the usual way is with the standard navigation system which can optionally have a navigation bar at the top with (back) button, title, etc... and you push/pop viewcontrollers in a hierarchical way. You can just turn the title (or change for your own style) but it does enforce a hierarchical structure.
If you don't want hierarchical navigation of your screens you can either do this with your own custom navigation controller than handles which viewcontroller is currently visible or you could use a thirdparty component like three60 which allows you to navigate around like a webbrowser does on webpages.
You may also want to take a look at Corona which is more for games but would allow you to do a totally custom interface with all sorts of custom transitions and just needs you to write lua... that said it will limit you on using their engine with this approach as you can't get to the ObjC level.
Finally one last approach is simply to use webview and pick up the clicked links so you design your app via webpages... rather ugly approach but can work well if you're very familiar with HTML.

IPAD APP Design Question - Lots of pages, with little to do

I am new to IPhone/iPad development and have a application design question.
1) I have about 60 different pages I converting from a Flash file. They are largely pretty devoid of stuff to do. Mainly reading and and some images.
2) There are a few interactive things (buttons, animations,etc.) on on about 50% of the pages
My initial thinking is to use a navigation controller (hidden, as I don't want as part of my design) to use the push and pop functionality. Each page would have it's own viewcontroller.
My other thought was to use hidden UINavigationController, but to group pages in specific areas and have multiple NIB files read from one view controller.
Is one better that the other? Or have more advantages than the other? Or is there a better way?
Not sure how to answer this, but you could probably have a few NIBs and ViewControllers and reuse them. There are a million ways to do simple navigation without UINavigationController -- it might be more of a pain that not using it.
For example, is navigation always like a tree (forward, forward, forward, back, back, back) --- or could it be more free form around a graph?
If navigation is simply push and pop, then use it, but try to keep the number of different viewcontrollers/NIBs to a minimum (for maintenance purposes)
The usual recommendation is one view controller per full page of content. However, if your content is remarkably similar, reusing the view controller is valid. Before proceeding, I'd think carefully about your navigation model:
Will users be able to jump from any page to another (say like a magazine)?
Do some pages require the user to visit other pages first?
For (2), the push/pop model works quite well, whereas for (1) the push/pop model of a UINavigationController may be too much trouble.
So focus on your presentation, and then let the code follow from that.