Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Well, I went into IB, and pressed the button. Then, CTRL-clicked the UIWebView, and clicked the action for that button. I cannot do that for my button, so please just help me here and stop pointing me to FAQs and tutorials when they will not help my problem e.e

If it's homework, which is what you told us earlier, aren't you supposed to know how to do this yourself?

You're basically asking for someone to do your homework for you, which you will then hand in and get credit for in whatever class you're taking. When I was in school, that was called cheating.

You're not only asking for help in cheating, you're being impatient about not getting the answers you seem to feel entitled to, instead of applying yourself to studying how to do it yourself.
 
I just need to finish this and I'll be gone, just please help me ._.
 
I have added a button, but still cannot figure out where to put the code nickculbertson gave me...
 
I have added a button, but still cannot figure out where to put the code nickculbertson gave me...

Talk to your teacher; tell them you are having problems with this assignment. Maybe they'll provide some needed guidance.

P.S. What school are you going to and what class are you taking?
 
Talk to your teacher; tell them you are having problems with this assignment. Maybe they'll provide some needed guidance.

P.S. What school are you going to and what class are you taking?

I do not think asking my teacher to help me is a wise idea... also it is not public school, more like a private course I took because I am interested in iOS programming...
 
I do not think asking my teacher to help me is a wise idea...
Why not?

...also it is not public school, more like a private course I took because I am interested in iOS programming...
Does that matter? You are taking a class to be educated in something. If you are not understanding something, I think you should be able to approach the instructor to have them perhaps try a different approach in order for you to be educated.

P.S. Why do you think it's not okay to ask your teacher for help, but asking us to help you cheat on your homework is okay?
 
Why not?


Does that matter? You are taking a class to be educated in something. If you are not understanding something, I think you should be able to approach the instructor to have them perhaps try a different approach in order for you to be educated.

P.S. Why do you think it's not okay to ask your teacher for help, but asking us to help you cheat on your homework is okay?

Why not? Well because he expects us to learn what he teaches us, and the way he teaches confuses me...

@PS Well, I am asking for help, and I am not cheating... this forum is so unhelpful...
 
Why not? Well because he expects us to learn what he teaches us, and the way he teaches confuses me...
He may not be aware that his way is confusing you but may be willing to try a different approach if he's informed of it. If you still can't learn it, perhaps you should get a refund on your class.

@PS Well, I am asking for help, and I am not cheating...
The help you are asking for is for others to solve a homework assignment for you, which you will then hand in as your own work. That's cheating.

...this forum is so unhelpful...
nickculbertson gave you a lot of the answer. Based on your skewed perception of "help", I'd say that was pretty helpful.
 
nickculbertson gave you a lot of the answer. Based on your skewed perception of "help", I'd say that was pretty helpful.

He gave me the actual code, but didn't tell me where to place it.

Code: 1/2
Where to place it: 1/2

His help = 1/2
 
He gave me the actual code, but didn't tell me where to place it.

Code: 1/2
Where to place it: 1/2

His help = 1/2
So, according to you:

His help = "so unhelpful".

When you should consider half the answer pretty darn helpful, considering you're supposed to be figuring this out on your own.
 
So, according to you:

His help = "so unhelpful".

When you should consider half the answer pretty darn helpful, considering you're supposed to be figuring this out on your own.

I am considering the half of the answer helpful, I have tried to put the code but failed... which is why I am asking.
 
What have you learned about the structure of an Objective-C class and where to put (instance variables, properties and) instance methods in the header file and then their corresponding pieces in the implementation file?
 
What have you learned about the structure of an Objective-C class and where to put (instance variables, properties and) instance methods in the header file and then their corresponding pieces in the implementation file?

Well I do not really remember since it is 10:12 and I have the worst memory ever... somewhere in my notes in my backpack.
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148a Safari/6533.18.5)

alexpja said:
What have you learned about the structure of an Objective-C class and where to put (instance variables, properties and) instance methods in the header file and then their corresponding pieces in the implementation file?

Well I do not really remember since it is 10:12 and I have the worst memory ever... somewhere in my notes in my backpack.

You should probably quit this course, if you still can, since you don't seem to have the drive or ambition to do the most basic things (like looking up information you already have) in order to succeed.
 
You should probably quit this course, if you still can, since you don't seem to have the drive or ambition to do the most basic things (like looking up information you already have) in order to succeed.

No, I will not quit the course... and I've been asking for help since Friday... so just forget it. Just help me and stop telling me what to do... I just want to finish this.
 
Not what I meant...
I know how to add an action to a button, I do not know where to put:
Code:
- (IBAction)mySite;
and
Code:
- (IBAction)mySite { 
	[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com"]]];
}
...

Don't know what to tell ya. Those videos tell you where to place codes that are almost identical.
 
watch this
http://www.youtube.com/watch?v=B7jB0D3Y7Ws

then this
http://www.youtube.com/watch?v=jUbnUFWIZgI&feature=channel

This should show you how to add an action to a button.

My app is not a view-controller app, but (iirc) navigation-based... Help DX

EDIT:

Hello! I've been looking for a way to get a button that is pressed to load a page in the webview and I found this:

Code:
UIWebView* webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 500, 500)];

NSString *urlAddress = @”http://www.example.com”;

NSURL *url = [NSURL URLWithString:urlAddress];

NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

[webView loadRequest:requestObj];

Now, the question is, where do I put it? :eek:

Also, would this work if I had a text box to enter a URL and press return and send it to the webview?
 
Last edited by a moderator:
.h

Code:
@interface appName : UIViewController {

}

-(IBAction)mySite;

@end

.m

Code:
@implementation appName

-(void)ViewDidLoad {

     [super viewDidLoad];
}


-(IBAction)mySite{
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.website.com"]]];
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.