problems on my web-app

Discussion in 'iOS Programming' started by adr96, Dec 18, 2011.

  1. adr96 macrumors newbie

    Joined:
    Dec 18, 2011
    #1
    Hi!
    This is my very first post here in the dev forum! I'm trying to make an app for the iPad, and on develop apps I'm a noob- I have just finished reading an Objective-C book.

    Well, what happens is that in my app I have an UIWebView(I want to make a little web-browser), so I want to do a few things that I have no idea how to do. In one hand I have a TextField. Here I write the link of the web where I want to go( no idea how to do this).
    In the other hand I want to make a History of the webs where I go(no idea too).

    Would someone help me please? I am lost; and I'd like to have the app finished for Christmas.

    Thak you!
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Which book? Please be specific: title, author, edition. Do you feel fairly comfortable with Objective-C programming now? Did you like the book? If so, perhaps you should pick up a book on iOS programming now?
     
  3. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #3
    So you want to write your own browser, in like 8 days, without any prior experience?
    Lol'd. Sorry, but that's just like a pretty weird statement to me, you really have to understand what you are doing, we can explain you the concept of how to do this, but will you have any idea what is going on, and what will you do after?
    These are some questions that make my brain think when I read it.
    You don't have an idea, of how to send the text of your textfield to another method that will load that text inside it's webview, and i nearly explained exactly without code what you should do..
    And about the history, you could just keep every thing they typed, or rather what they actually have browsed etc. It's not drag/drop development here.
     
  4. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #4

    The book is iPhone and iPad apps for absolute beginners, and the author is Rory Lewis, year 2010; I know that there's a new edition specific for iOS 5 from 2011, this christmas I'll try to get it.
    I come from C so the hard thing was to learn OOP; but it's done now. I have read the book slowly in 3 months I think, in order to understand all the concepts and syntax of Objective-C. The only problem for me is that there are so many methods and things in Xcode that they are not explained in the book. This can be solved with practice. Anyway I feel happy because I have understood all!

    ----------

    I understand what I'm doing and why... The problem is that I feel Objective-C is difficult to read, so with too much code I do a mess. I try to comment all the things that I do in my app and why. But when u say that if I understand the code I tell yes.
     
  5. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #5
    If the features you stated already are all you want to do, I'd say the app can made in under two hours by someone who understands everything they need to do.

    Here's a way to do it:

    1.) Drag in a nav bar. Add a text field to it, a "refresh/load/stop" button, and a history button to it.
    2.) Drag in a UIWebView to the rest of the space.
    3.) When the load/refresh button is hit, or the text field's return button, dismiss the keyboard, load the UIWebView, and add the address to a mutable array containing your history (or learn core data and use that.)
    4.) When the history button is hit, modally bring in a list view that lists everything from the mutable array. When a row is selected, send back to the delegate to dismiss the table, fill in the text field, and begin loading the page. Also have a dismiss button for if the user decides not to go back to a previous page. That would just tell the delegate to dismiss it.

    Alright, I think I've said enough. There should be several keywords in there you can use to help find more info on google about how to do this all if it's not clear enough.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    You probably don't need a new edition of the book. You need a new book, or tutorials, or whatever, that cover textFields as well webViews.
     
  7. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #7
    Thank you! Now I understand all what I have to do. Now I only have to translate it to Objective-C and that's all!

    ----------


    OK. I will search something in the web to cover it. Thank u so much!
     
  8. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #8
    hi guys! This afternoon I have been able to do it. And it worked! Thank you so much! I was doing a mess; but now it works! :D
     
  9. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #9
    Wow, glad I could help. It's always nice to know that procrastination on my own work helps others out.
     
  10. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #10
  11. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
  12. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #12
    OK OK. So now that I have finished all the things that I had to do ( study party ) I've had some time to develop. And I don't understand anything of the text below :D. So in my browser I have to do the history and the other thing. Can anyone post some code and I will try to understand it?:(
     
  13. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #13
    1. Go to the UIWebView class reference doc.
    2. Find the Related sample code links.
    3. Click one of the links.
    4. Read the code.

    If you can't find any other UIWebView example code, then select the green-hilited words in this sentence and google them. Also try googling UIWebViewDelegate sample code.
     
  14. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #14
    So, what do you know about delegation?
     
  15. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #15
    Not to much......:( It wasn't well explained in my book; so if u can give me a web where I could learn about it...
     
  16. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #16
    Cocoa Core Competencies: Delegation

    But since I feel you're no longer an absolute beginner but still a beginner at iOS Programming, I'm gonna suggest that now is a good time to step back from the real coding and go learn the fundamentals of Objective-C programming.
     
  17. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #17
    Thank you! I will do what u are suggesting. This christmas I'll get a book of obj-c.
     

Share This Page