Search Results

Search found 3 results on 1 pages for 'aarong'.

Page 1/1 | 1 

  • Regex optional match in python fails

    - by AaronG
    tickettypepat = (r'MIS Notes:.**(//p//)?.**') retype = re.search(tickettypepat,line) if retype: print retype.group(0) print retype.group(1) Given the input. MIS Notes: //p// Can anyone tell me why group(0) is MIS Notes: //p// and group(1) is returning as None?

    Read the article

  • commitAnimations is not resizing my UIImageView subview

    - by AaronG
    I have created a UIView as a subview and to that subview I have added a UIImageView as a subview. UIView *viewCreated; UIButton *buttonCreated; UIImageView *imageViewCreated; CGRect myFrame = CGRectMake(0, 0, 1024, 1024); viewCreated = [[UIView alloc] initWithFrame:myFrame]; [viewCreated setTag:intTag]; viewCreated.backgroundColor = [UIColor redColor]; [self.view addSubview:viewCreated]; [self randomize]; UIImage *d1Image = [UIImage imageNamed:[NSString stringWithFormat:@"image%d.png", randomNumber]]; imageViewCreated = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f,0.0f,1024.0f, 1024.0f)]; [imageViewCreated setImage:[UIImage imageNamed:[NSString stringWithFormat:@"image%d.png", randomNumber]]]; [viewCreated addSubview:imageViewCreated]; //[imageViewCreated release]; return [viewCreated autorelease]; But when this code executes only the first subview is animated and resized. The UiimageView moves 200 pixels to the left but does not get resized. NSLog(@"sender tag %i",[sender tag]); UIView *currentView = [self.view viewWithTag:[sender tag]]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.5]; currentView.frame = CGRectMake(-200, 0,40, 102); [UIView commitAnimations]; I am pretty sure am I not creating the subviews correctly programmatically, because when I do it in Interface Builder it works as expected. Do I have to do something specific to actually attach the behavior of the second subview to the first subview?

    Read the article

  • How do I call a static bool method in main.m

    - by AaronG
    This is Objective-C, in Xcode for the iPhone. I have a method in main.m: int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; //I want to call the method here// int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; } static BOOL do_it_all () { //code here// } How do I call the do_it_all method from main.m?

    Read the article

1