zoukankan      html  css  js  c++  java
  • iOS--获取Assets.xcassets中的icon图片

        CGSize viewSize = self.window.bounds.size;
        NSString *launchImage = nil;
        
        
        NSDictionary *infoPlist = [[NSBundle mainBundle] infoDictionary];
        NSString *icon = [[infoPlist valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"]lastObject];
        
        NSLog(@"uuuuuuuu = %@", icon);
        
        CGSize imageSize = CGSizeFromString(icon);
        if (CGSizeEqualToSize(imageSize, viewSize))
        {
            launchImage = icon;
          
        }
        
        UIImageView *launchView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:icon]];
        launchView.frame = self.window.bounds;
        //    launchView.contentMode = UIViewContentModeScaleAspectFill;
        [self.window addSubview:launchView];
        
        [UIView animateWithDuration:2.0f
                              delay:0.0f
                            options:UIViewAnimationOptionBeginFromCurrentState
                         animations:^{
                             
                             launchView.alpha = 0.0f;
                             launchView.layer.transform = CATransform3DScale(CATransform3DIdentity, 1.2, 1.2, 1);
                             
                             NSLog(@"1111111111111");
                             
                         }
                         completion:^(BOOL finished) {
                             
                             NSLog(@"2222222222222");
                             [launchView removeFromSuperview];
                             
                             
                         }];
        
  • 相关阅读:
    继续JS之DOM对象二
    js之DOM对象一
    js之DOM对象三
    jQuery基本语法
    Jquery2--属性相关的操作
    jquery之文档操作
    jQuery之jQuery扩展和事件
    Bootstrap补充
    函数式编程
    数据结构,字典
  • 原文地址:https://www.cnblogs.com/LzwBlog/p/5842271.html
Copyright © 2011-2022 走看看