zoukankan      html  css  js  c++  java
  • IOS6 in Practice 记录1

    - (UIImage*)imageWithImage:(UIImage*)image 
                  scaledToSize:(CGSize)newSize;
    {
        UIGraphicsBeginImageContext( newSize );
        [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
        UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        
        return newImage;
    }

     Presenting view controllers on detached view controllers is discouraged

    http://stackoverflow.com/questions/19890761/warning-presenting-view-controllers-on-detached-view-controllers-is-discourage

     可以移动的imageview

    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
    {
        [super touchesMoved:touches withEvent:event];
        
        float deltaX = [[touches anyObject] locationInView:self].x - [[touches anyObject] previousLocationInView:self].x;
        float deltaY = [[touches anyObject] locationInView:self].y - [[touches anyObject] previousLocationInView:self].y;
        self.transform = CGAffineTransformTranslate(self.transform, deltaX, deltaY);
    }

    发邮件

    NSData *imageAsData = UIImagePNGRepresentation(i);
        [mailController addAttachmentData:imageAsData mimeType:@"image/png" fileName:@"PicDecor.png"];
        [mailController setSubject:@"My PicDecor Image"];
       
        [self.view.window.rootViewController presentViewController:mailController
                                                         animated:YES completion:nil];
  • 相关阅读:
    LeetCode 21. 合并两个有序链表
    LeetCode 20. 有效的括号
    LeetCode 19. 删除链表的倒数第N个节点
    AI
    http
    IP地址
    wiodows /linux CMD
    git
    AI
    JS常用的获取值和设值的方法
  • 原文地址:https://www.cnblogs.com/dqxu/p/4042491.html
Copyright © 2011-2022 走看看