UIButton TouchUpInside Touch Location

UITouch *theTouch = [touches anyObject]; CGPoint where = [theTouch locationInView:self]; NSLog(@” touch at (%3.2f, %3.2f)”, where.x, where.y); That’s the right idea, except that this code is probably inside an action in your view controller, right? If so, then self refers to the view controller and not the button. You should be passing a pointer to … Read more

What is the use of “object sender” and “EventArgs e” parameters?

EventArgs e is a parameter called e that contains the event data, see the EventArgs MSDN page for more information. Object Sender is a parameter called Sender that contains a reference to the control/object that raised the event. Event Arg Class: http://msdn.microsoft.com/en-us/library/system.eventargs.aspx Example: protected void btn_Click (object sender, EventArgs e){ Button btn = sender as … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)