Skip to main content

Posts

Showing posts with the label objective-c

Does UIGestureRecognizer work on a UIWebView?

I am attempting to get a UIGestureRecognizer working with a UIWebview which is a subview of a UIScrollView. This sounds odd but when I have the numberOfTouchesRequired set to 2 the selector fires, but when numberOfTouchesRequired is set to one the selector doesn't fire.

Custom UITableViewCell redraw issues

I have a custom UITableView cell that I've added a textbox to for editing, that shows and hides based on the edit mode. I've also tried adding a vertical line that shows when editing, and it does that, but I'm running into some drawing issues. I just added a green checkmark rightView to start working on input validation feedback, and I'm seeing similar issues.

App crashes with 4.2 iPhone simulator "set start-with-shell off"

I'm writing application which perfectly works on 4.0/4.1 iPhone simulator, but not 4.2. I'm getting such warning: Detected an attempt to call a symbol in system libraries that is not present on the iPhone: fcntl$UNIX2003 called from function get_socket_nonblocking in image TestApp. If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first. How to set 'set start-with-shell off' on Xcode? I'm tried to add this line to .gdbinit but without luck. With 4.0/4.1 SDK iPhone Simulator prints warnings about attempt to call symbol that is not present on the iPhone in debug window, but app don't crashes. Using using 4.2 app crashes. How to prevent 4.2 crashes ? Thanks Source: Tips4all

Drawing waveform with AVAssetReader

I reading song from iPod library using assetUrl (in code it named audioUrl) I can play it many ways, I can cut it, I can make some precessing with this but... I really don't understand what I gonna do with this CMSampleBufferRef to get data for drawing waveform! I need info about peak values, how I can get it this (maybe another) way? AVAssetTrack * songTrack = [audioUrl.tracks objectAtIndex:0]; AVAssetReaderTrackOutput * output = [[AVAssetReaderTrackOutput alloc] initWithTrack:songTrack outputSettings:nil]; [reader addOutput:output]; [output release]; NSMutableData * fullSongData = [[NSMutableData alloc] init]; [reader startReading]; while (reader.status == AVAssetReaderStatusReading){ AVAssetReaderTrackOutput * trackOutput = (AVAssetReaderTrackOutput *)[reader.outputs objectAtIndex:0]; CMSampleBufferRef sampleBufferRef = [trackOutput copyNextSampleBuffer]; if (sampleBufferRef){/* what I gonna do with this? */} Please hel