zoukankan      html  css  js  c++  java
  • Iphone 显示本地的图片

      NSString *homeDirectoryPath = NSHomeDirectory();

        NSString *imagePath = [homeDirectoryPath stringByAppendingString:@"/graph.png"];

        NSLog(@"Image: %@", imagePath);

        if (![[NSFileManager defaultManagerfileExistsAtPath:imagePath isDirectory:NULL]) 

        {

            UIImageView * myImageView = [[UIImage allocinitWithContentsOfFile: imagePath];

            //[[NSFileManager defaultManager] createDirectoryAtPath:imagePath attributes:nil];

     

            [self.view addSubview:myImageView];

            [myImageView release];

        }    

  • 相关阅读:
    3.29上午
    3.28下午
    3.28上午
    3.27下午
    3.24的下午
    2017.3.16上午学习内容
    2017.3.15上午学习内容
    2017.3.14下午学习内容
    2017.3.14上午学习内容
    2017.3.13下午学习内容
  • 原文地址:https://www.cnblogs.com/fly_binbin/p/2160786.html
Copyright © 2011-2022 走看看