I would like to do the following on iPhone/iPodTouch: Open a video and - via swipe or tilt - use gesture to move through each frame. Think of it as a gestural flipbook.
Does the video API support seeking frame by frame in this manner?
Thanks,
Doug
...
I want to make a list, that is divided in 2 parts, left and right. The left part can only scroll vertically (has a list in it). The right part scrolls vertically, and horizontally..
So, I want a control that has a list on the left side, and a view on the right side, both detect scrolls. But the left part always stays on the screen, and ...
In cocos2d, I'm trying to call a method on the Parent of a CocosNode. The app works fine, but I get an 'Object' may not respond to 'method' warning. The parent is a subclassed Cocos2d layer, so I'm guessing I need to cast parent somehow, but that generates fatal errors.
The method is like this
if(CGRectContainsPoint([newBrick boundingB...
Hi!
Im using NSXMLParser to dissect a xml package, I'm receiving &apos inside the package text.
I have the following defined for the xmlParser:
[xmlParser setShouldResolveExternalEntities: YES];
The following method is never called
- (void)parser:(NSXMLParser *)parser foundExternalEntityDeclarationWithName:(NSString *)entityName pu...
I'm experimenting with ViewControllers & NavigationControllers in Interface Builder trying to get a better grasp of what's tied to what and why... I'm struggling with a scenario that has confused me. Hopefully someone can set me straight...
Say I start with your typical iPhone template View-Based Application and I display a view which i...
I have a UIViewController, and I've added two subviews to its view. One subview is the view of a UIViewController. The other subview is a UITextField.
I need to dismiss the keyboard for the UITextField when the user touches the other view, but I can't figure out how to detect those events. The UIViewController's tableView catches the...
Can I optimize a Core Data query when searching for matching words in a text? (This question also pertains to the wisdom of custom SQL versus Core Data on an iPhone.)
I'm working on a new (iPhone) app that is a handheld reference tool for a scientific database. The main interface is a standard searchable table view and I want as-you-t...
I am not sure if the way that applied in touchesBegan can be applied as well in ccTouchesBegan or other touches call back. For example I have some code:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSUInteger numTaps = [[touches anyObject] tapCount];
touchPhaseText.text = @"Phase: Touches began";
touchIn...
In the CocoaXMLParser class of Apple's CocoaXMLParser example, the following code appears:
rssConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
[self performSelectorOnMainThread:@selector(downloadStarted) withObject:nil waitUntilDone:NO];
if (rssConnection != nil) {
do {
[[NSRunLoop currentRun...
Hi,
demo works as expected, no problems. But now I'm trying to integrate it into my project. I use no xib-s, code only:
OAuthTwitterDemoViewController *vc = [[OAuthTwitterDemoViewController alloc] init];
[[UIApplication sharedApplication].keyWindow addSubview:vc.view];
[vc release];
it compiles and runs with no errors, but the actual ...
Hi,
this is my program .
//Interface file.
#import <Foundation/Foundation.h>
@interface reportView : UIView {
}
- (void)touchesBegan: (NSSet *)touches withEvent: (UIEvent *)event;
- (void)touchesEnded: (NSSet *)touches withEvent: (UIEvent *)event;
- (void)touchesMoved: (NSSet *)touches withEvent: (UIEvent *)event;
@end
//Implementati...
Hello!
I'm currently working on an iPhone application with a single view, which has multiple UITextFields for input. When the keyboard shows, it overlays the bottom textfields. So I added the corresponding textFieldDidBeginEditing: method, to move the view up, which works great:
- (void)textFieldDidBeginEditing:(UITextField *)textField...
For my iphone app, I have an editable (for delete) table view. I'd like to be able to detect that the user has clicked the "Edit" button. See this image: http://grab.by/It0
From the docs, it looked like if I implemented :
- (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath
then I coul...
Hi,
I got the coordinates of touchesBegan and touchesEnded.
But in touchesMoved can I get all the coordinates of the touch from touchesBegan to touchesEnded.
I mean that when I put finger on screen and dragged to some position and then I lifted it.
So, can I get all the coordinates of the starting position to end position.
If possible, ...
Hey there
For sure this is very trivial math stuff for some of you.
But: When I rotate a view, lets say starting at 0 degrees and rotating forward 0.1, 1, 10, 100, 150, 160, 170, 179, 179,999, and keeping on rotating in the same direction, this happens, to say it loud and clear: BANG !!!! BAAAAAAAAANNNNNGGGG!!!! -179,9999, -170, -150,...
NSError requires a domain, which I understand segments the range of error codes.
One would anticipate that there exist somewhere a registry of domain.error code but I've not been able to discover one.
Supposedly this could used for looking up localized descriptions for errors.
Does anyone have any set of known best practices for deali...
There are a number of discussions on stackoverflow.com about what is the best iPhone game platform/engine. My question is not necessarily what is the best, but what is the best for an experienced iPhone developer but not not experienced in game design. This will also be a solo project plus a graphics designer. Consider I will be worki...
I have a method that returns a CGMutablePathRef, something like this:
- (CGMutablePathRef)somePath;
{
CGMutablePathRef theLine = CGPathCreateMutable();
CGPathMoveToPoint(theLine, NULL, 50, 50);
CGPathAddLineToPoint(theLine, NULL, 160, 480);
CGPathAddLineToPoint(theLine, NULL, 270, 50);
return theLine;
}
The Xcode/Cla...
Shark tells me that this is a hotspot for bad performance:
double distanceA = fabsf(target - current);
target is CGFloat
current is CGFloat
the rest of my calculations rely on double. Maybe there's some smarter way to do this anyways?
...
I have this piece of code where Shark tells me it's a performance bottleneck:
CGFloat shortestDistance = (distanceA < distanceB) ? distanceA : distanceB;
all these values are CGFloat. Is there a faster way to figure out which one is smaller and assign that to shortestDistance? Maybe even by reference instead of copying a value? How wo...