Contenu connexe Similaire à CocoaHeads Toulouse - Guillaume Cerquant - UIView (20) Plus de CocoaHeads France (20) CocoaHeads Toulouse - Guillaume Cerquant - UIView5. [… locationManager:locationManager
didUpdateToLocation:@”Toulouse”
fromLocation:@”Paris”];
6. […
stringByReplacingOccurrencesOfString:
@" "
withString:
@" "];
9. Hey, UIView, t’es comment ?
Hey, subview de UIView, t’es comment ?
Hey, subview de subview de UIView, t’es comment ?
Hey, subview de subview de subview de UIView, t’es
comment ?
Hey, subview de subview de subview de subview de
UIView, t’es comment ?
Hey, subview de subview de subview de subview
de subview de UIView, t’es comment ?
Hey, subview de subview de subview de subview
de subview de subview de UIView, t’es comment ?
Technical Note TN2239
http://developer.apple.com/library/ios/#technotes/tn2239/_index.html
16. CGGeometry.h
/* Points. */
struct CGPoint {
CGFloat x;
CGFloat y;
};
typedef struct CGPoint CGPoint;
/* Sizes. */
struct CGSize {
CGFloat width;
CGFloat height;
};
typedef struct CGSize CGSize;
/* Rectangles. */
struct CGRect {
CGPoint origin;
CGSize size;
};
typedef struct CGRect CGRect;
23. - (CGRect)convertRect:(CGRect)rect
fromView:(UIView *)view
- (CGRect)convertRect:(CGRect)rect
toView:(UIView *)view
- (CGPoint)convertPoint:(CGPoint)point
fromView:(UIView *)view
CGRect rect =
[view convertRect:view.bounds toView:self];
25. [[UIApplication sharedApplication]
beginIgnoringInteractionEvents];
[UIView animateWithDuration:0.4
animations:^{
webViewScreenshotImageView.transform =
CGAffineTransformMakeScale(0.7, 0.7);
} completion:^(BOOL finished) {
[[UIApplication sharedApplication]
endIgnoringInteractionEvents];
[self.navigationController
popViewControllerAnimated:YES];
}];
Notes de l'éditeur \n \n \n \n \n \n Plan\nDebug d’une hierarchie de view\nManipulation de CGRect\nWarning\nOutils\n TemplatesCollectionViewController.m\n \n \n Activate breakpoint\n po [self.view recursiveDescription]\n\npo [[UIWindow keyWindow] recursiveDescription]\n SHOW LAYOUT\nThen, la même at Runtime, avec border (in DocumentTemplateCollectionViewCell.m)\nthen SupportViewController.m\n SLOW ANIMATION\n\nOn device (discard animation)\nApple apps\n \n \n \n \n In 64-bit, or when you compile with NS_BUILD_32_LIKE_64, NSRect is defined as CGRect, so you don't even need to jump through the pointer hoop\n \n \n \n \n \n Mise en garde hiérarchie de view\n Bon en math (TI-89)\nExample d’usage UIWindow\n \n \n Animation (no frame resizing)\nKVO\n NSView only\nUIView all layer backed\n \n \n \n coordinates : c\ntoggle view outlines : o\nopaque view : O\np rint\na ccesibilty\nv recursive\nmove left / right\nresize\n- + pour alpha\nd isplay\nl ayout\nr eload data\n\nflash on draw rect\n \n \n \n \n \n \n