知道如何在Cocoa Touch中读取.ppt文件吗?
我试图在UIWebView中加载文件的内容,但它不起作用.这是代码:
[aWebView loadData:[NSData dataWithContentsOfFile:filePath]
MIMEType:@"application/vnd.ms-powerpoint"
textEncodingName:@"utf-8"
baseURL:[NSURL fileURLWithPath:filePath]];
[powerWeb loadData:[NSData dataWithContentsOfFile:filePath]
MIMEType:@"application/vnd.ms-powerpoint"
textEncodingName:@"utf-8"
baseURL:[NSURL fileURLWithPath:filePath]];
Run Code Online (Sandbox Code Playgroud)
所有建议都非常感谢.
谢谢
我有以下代码来获取主机名和IP地址,
#include <stdlib.h>
#include <stdio.h>
#include <netdb.h> /* This is the header file needed for gethostbyname() */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int main(int argc, char *argv[])
{
struct hostent *he;
if (argc!=2){
printf("Usage: %s <hostname>\n",argv[0]);
exit(-1);
}
if ((he=gethostbyname(argv[1]))==NULL){
printf("gethostbyname() error\n");
exit(-1);
}
printf("Hostname : %s\n",he->h_name); /* prints the hostname */
printf("IP Address: %s\n",inet_ntoa(*((struct in_addr *)he->h_addr))); /* prints IP address */
}
Run Code Online (Sandbox Code Playgroud)
但是我在编译期间收到警告:
$cc host.c -o host
host.c: In function ‘main’:
host.c:24: warning: format ‘%s’ expects type ‘char …Run Code Online (Sandbox Code Playgroud) 我在构建源代码时收到警告,如下所示:
/*com.apple.ibtool.document.warnings*/
/Users/biranchi/Desktop/Hotlist v2.0/Classes/HLCheckinViewController.xib:6:警告:iPhone OS版本不支持分隔符样式"Single Line Etched" 3.2之前.
这个错误到底是什么?
谢谢
是否可以设置自定义返回键类型UITextField?
[txtField setReturnKeyType:UIReturnKeyDefault];
Run Code Online (Sandbox Code Playgroud)
我希望用"SHARE"这个词代替返回键类型.
谢谢
我在设备上运行我的应用程序时收到此错误.我已安装了分发配置文件.
调试器出错:启动远程程序时出错:无法从进程1637获取任务
谢谢
什么是“Error Domain=NSURLErrorDomain Code=-1020 UserInfo=0x1694a0”操作无法完成。(NSURLErrorDomain 错误 -1020。)"" 由于 ??
我正在使用AVAudioPlayer该类在我的应用程序中播放.mp3文件.是否可以通过编程方式检查耳机是否已连接到设备?
在第一代iPod设备中,当没有连接耳机时,音量控制条被隐藏(用于音乐和视频).
我遇到了XCode-> Project-> Edit Active Target"projectname"设置的问题
我正在尝试将"产品名称"设置为"我的应用程序",但在设备中运行应用程序时.我收到错误,因为产品名称中存在非法字符.
我甚至试过 - 和_(My-App,My_App),但这些都没有.
但它在模拟器中工作正常.
可能是什么原因?
谢谢.
如何在objective-C中使用如何使用NSRunLoop并等待一些变量来改变值?
谢谢
iphone ×6
objective-c ×4
cocoa-touch ×3
c ×1
cocoa ×1
geoip ×1
hostent ×1
nsrunloop ×1
php ×1
powerpoint ×1
uikit ×1
uiwebview ×1
xcodebuild ×1