iboutlet in document based application - xcode

i am searching from over 2 hours without finding an answer!
i am a noob in xcode and cocoa programming.. basically my xib file contains a tab view, and in one of the tabs i placed a webview. i also added the web framework.
my app is a document based application. and i am not able to declare an iboutlet for the webview in order to make it load a URL.
how am i supposed to declare the iboutlet in a document based application? and evne more in what file am i supposed to do it?
please keep the answer as simple as possible since i am veeery green in this and coming from Windows it takes some time understand the mac environment.
tahnk you!
Igor

Probelm solved!
first i fogto to implement the webkit framework, then i added the implementation to the app delegate instead of the document. thus when opening a document it did not load the page!
thanks for your help anyway jemmons!

I think : you have to import WebKit:
import < WebKit/WebKit.h>
That's just a guess, though, since you haven't posted enough code to say for sure.

Related

xib is not visible when try to call from app delegate of the application

I am building a cocoa application where required to invoke xib. I tried with several codes but seems making mistake somewhere due to the reason the xib comes behind every window. Thank you in advance.
I have also faced the same problem and #jigs helped me with a good solution.My problem was with storyboard but ii will work for xibs also. Try this, it might be helpful to you also.
tested solution

Collection View Not Visible in Simulator

I am extremely new at Xcode. I am building an app that has a collection view in it. It looks great in the storyboard view, but nothing shows up when I run the simulator. I have images and labels in the cells. I have created a subclass for the cells and made my connections for the images and labels into the .h file. For right now I am just making a stub prototype (cells don't link to anything). If anyone can give me an answer or just suggest something to try than that would be great.
You're making a dynamic prototype - to actually show data, you need to read up on datasources and delegates.
If I were you, I would start with trying to make a simple UITableView app first. Google UITableView tutorial to get started.
After you're familiar with the above concepts, then would I suggest to go through a collection view tutorial - it's a relatively simple set of concepts when you get it, but you have to get it first :)

Tabbed application troubles in xcode

I am working with my first tabbed application in xcode. I am just testing with some stuff since I'm relatively new to programming. I am just using the 2 views already put into the template. I am putting a slider into the first view and am going to attach it to a text box with numbers. But that isn't the problem! This is probably really stupid and simple, but when i run the application just to see the stuff on the simulator, it is just showing a black screen. NO CLUE WHY! But its killing me and would love some help!
You are not suppose to make connections in AppDelegate. You should use a ViewController for each class. I.E. FirstViewController, SecondViewController. AppDelegate is usually only used for calling save/restore messages.
You are getting the error because the storyboard view is assuming you are assigning it to the correct view. When you create the storyboard say you named it TestApp. Then, you should have a few classes. TestAppDelegate, TestAppDelegateFirstViewController, TestAppDelegateSecondViewController. Or something along those lines. FirstViewController should connect to the first view on the tab view. The Second should attach to the second.
AppDelegate is almost never used for UI. I would suggest you find a book on the matter. I'll suggest "iOS Programming. The Big Nerd Ranch Guide". It helped me a lot when I started.
Photo Exmaple:
I did end up starting a new project. Weird that the black screen showed up.. not really sure why that error was popping up.. I'm not really that knowledgable about the different errors and bugs that a program can have yet! Getting closer though!

Xcode 4.2: What is the most effective method switching views?

I was thinking of games in particular, where there may be alot of views that need to be switched in and out. Could someone supply some sample xcode 4.2 code? Many tutorials have old xcode versions which have different initial code.
Thanks
Most efficient method I would say is usin the story board feature. Set up a new view controller inside the main storyboard file and then control drag from which red button on one view to the next one. Very easy and no code required. Email me if you had any problems dai.evans94#live.co.uk

Editable CATextLayer?

I have several CATextLayers. When I doubleclick one of them, I want to be able to edit it's string. Think of text as it's handled in Keynote or many other apps. Any ideas?
I thought of putting an editable textfield right in front of the layer and then dismiss it on enter, but I didn't get far. :-(
I target Mac OS X 10.5 with Objective-C 2.0 and Garbage Collection.
Any help or pointers would be greatly appreciated. Thanks in advance!!
I think your approach using an editable NSTextFieldCell is the right way to go. It's not a trivial task, but you can do it.

Resources