我需要在Objective-C中解析NSString ..即如果输入路径字符串是/ a/b/c/d,我需要解析路径字符串以获得outout// a/b/
我如何实现它?输入路径字符串:/ a/b/c/d预期输出路径字符串:/ a/b /请帮帮我.
谢谢.SUSE.
要.exe使用Qt SDK在Linux中创建,我应该在Linux中交叉编译我的应用程序还是在Windows中交叉编译我的应用程序?
Plz帮助我理解principalClass的用途是什么?它的语法是什么.我理解它是在NSBundle类中,但我们可以为任何捆绑创建它是否仅适用于可萝卜捆绑?plz帮我了解principalClass的概念.
感谢您.
如何在Objective-C中动态加载一个类?根据我的需要,类名将在一个文本文件中,我需要读取它,然后动态加载类...
这段代码用Java加载一个类...我希望在Objective-C中完成相同的功能......
public class MainClass {
public static void main(String[] args){
ClassLoader classLoader = MainClass.class.getClassLoader();
try {
Class aClass = classLoader.loadClass("com.jenkov.MyClass");
System.out.println("aClass.getName() = " + aClass.getName());
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
Run Code Online (Sandbox Code Playgroud)
使用Objective-C中的哪个函数代替Java中的loadClass()?
如何在Objective-C中的特定索引处打印数组元素?我的代码看起来像这样:
NSString *String=[NSString StringWithContentsOFFile:@"/User/Home/myFile.doc"];
NSString *separator = @"\n";
NSArray *array = [String componetntsSeparatedByString:separator];
NSLog(@"%@",array);
Run Code Online (Sandbox Code Playgroud)
我能够一次打印一个数组的全部内容,但我想将每个索引处的元素分配给一个字符串,比如......
str1=array[0];
str2=array[1];
str3=array[0];...this continues
Run Code Online (Sandbox Code Playgroud)
我该怎么做呢?
我有一个int值,需要转换为字节数组.你如何在Objective-C中做到这一点?有没有办法做到这一点?
谢谢,
你能告诉我在Objective-C中存档NSArray自定义对象的语法或示例程序吗?
如何在Objective-C中反转NSArray的内容?
假设我有一个包含这些数据的数组
NSArray arrayObj = [[NSArray alloc]init];
arrayObj atindex 0 holds this: "1972"
arrayObj atindex 1 holds this: "2005"
arrayObj atindex 2 holds this: "2006"
arrayObj atindex 3 holds this: "2007"
Now i want to inverse the order of array like this:
arrayObj atindex 0 holds this: "2007"
arrayObj atindex 1 holds this: "2006"
arrayObj atindex 2 holds this: "2005"
arrayObj atindex 3 holds this: "1972"
Run Code Online (Sandbox Code Playgroud)
如何实现这个?
谢谢.
如何在iPhone上进行文件读/写操作?这是我需要指定保存文件的路径?我怎样才能获得iPhone当前的工作目录?
谢谢
objective-c ×7
iphone ×3
nsarray ×2
arrays ×1
bytearray ×1
classloader ×1
filesystems ×1
int ×1
inverse ×1
linux ×1
nsbundle ×1
nsstring ×1
parsing ×1
qt ×1
windows ×1