UIProgressView and Custom Track and Progress Images (iOS 5 properties)

Here’s what’s going on: The images you provide to the UIProgressView are basically being shoved in to UIImageViews, and the UIImageView is stretching the image to fill the space. If you simply do: [progressView setTrackImage:[UIImage imageNamed:@”track.png”]]; Then you’re going to get weird results, because it’s trying to stretch a 10px wide image to fill (for … Read more

NSTextField – White text on black background, but black cursor

Since in practice the NSText* returned by -currentEditor for an NSTextField is always an NSTextView*, I added the following code to my custom NSTextField subclass: -(BOOL) becomeFirstResponder { BOOL success = [super becomeFirstResponder]; if( success ) { // Strictly spoken, NSText (which currentEditor returns) doesn’t // implement setInsertionPointColor:, but it’s an NSTextView in practice. // … Read more

How to detect touches on UIImageView of UITableViewCell object in the UITableViewCellStyleSubtitle style

In your cellForRowAtIndexPath method add this code cell.imageView.userInteractionEnabled = YES; cell.imageView.tag = indexPath.row; UITapGestureRecognizer *tapped = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(myFunction:)]; tapped.numberOfTapsRequired = 1; [cell.imageView addGestureRecognizer:tapped]; [tapped release]; And then to check which imageView was clicked, check the flag in selector method -(void)myFunction :(id) sender { UITapGestureRecognizer *gesture = (UITapGestureRecognizer *) sender; NSLog(@”Tag = %d”, gesture.view.tag); … Read more

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