zoukankan      html  css  js  c++  java
  • iOS学习-UIBundle

    //
    //  ViewController.m
    //  NSBundle详解
    //
    //  Created by 大欢 on 16/1/20.
    //  Copyright © 2016年 bjsxt. All rights reserved.
    //

    #import "ViewController.h"

    @interface ViewController ()

    @end

    @implementation ViewController

    - (void)viewDidLoad {
        [super viewDidLoad];
        
        //束,目录
        NSString * string = [NSBundle mainBundle].bundlePath;
        NSLog(@"%@",string);
        
        //Resource:文件名
        //ofType:文件名后缀
        //inDirectory:Bundle下的目录
        
        
        NSString * path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"plist"];
        
        NSString * path2 = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"plist" inDirectory:@"image"];
        
        NSArray * array = [NSArray arrayWithContentsOfFile:path2];
        
        NSLog(@"%@",array);
    }

    - (void)didReceiveMemoryWarning {
        [super didReceiveMemoryWarning];
        // Dispose of any resources that can be recreated.
    }

    @end
    /***************************************************/

  • 相关阅读:
    jQuery实现“回到顶部”按钮功能
    围绕DOM元素节点的增删改查
    jQuery ajax
    对JSON的理解
    Replacing Accented characters(Diacritic) .NET
    全球主要城市经纬度api
    无标题
    Use Razor for Email Template outside ASP.NET MVC
    .NET and php
    knockoutjs
  • 原文地址:https://www.cnblogs.com/MrWuYindi/p/5146720.html
Copyright © 2011-2022 走看看