小编Nic*_*ght的帖子

NSURLConnection在3G上下载质量差的JPEG

我正在从服务器下载JPEG图像,并使用NSURLConnection将其分配到我的iPhone应用程序中的图像对象.

当我使用Wifi连接时,一切正常,但一旦切换到3G,下载的JPEG质量就会大大降低.

还有其他人经历过这个吗?

有谁知道强迫iPhone下载全品质JPEG的方法?

提前致谢!缺口.

cocoa-touch

2
推荐指数
1
解决办法
757
查看次数

如何在没有设备自动旋转的情况下检测iPhone上的旋转?

有人知道怎么做吗?

我想这个:

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {
}

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
}

- (void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}

- (void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
}

- (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration {
}
Run Code Online (Sandbox Code Playgroud)

可能会阻止设备旋转(覆盖我的UIViewController的所有旋转方法而不是调用超类)但我担心它不是实际执行旋转的UIViewController.

我的UIViewController在UINavigationController中.

有人有主意吗?

干杯,尼克.

iphone cocoa-touch rotation

2
推荐指数
1
解决办法
1万
查看次数

从Bash脚本在线程中运行UNIX命令

问题背景

我有一个SVN存储库的post-commit脚本,它在签入时存档并备份增量转储文件.

我想更新它以进行异地备份,但是如果签入很大,异地拷贝可能需要几分钟才能完成.

在UNIX bash脚本中是否可以在立即返回的线程中执行此副本,在后台执行操作?

欢呼任何帮助!

unix multithreading

2
推荐指数
1
解决办法
3279
查看次数

我的UTF8字符串中的Django\u字符

我将UTF-8数据添加到Django中的数据库.

当数据进入数据库时​​,一切看起来都很好 - 字符(例如):"Hello"是UTF-8编码的.

我的MySQL数据库是UTF-8编码的.当我通过选择来检查数据库中的数据时,我的示例字符串如下所示:?Hello?.我假设这显示字符为UTF-8编码.

当我从终端中的数据库中选择数据或导出为Web服务时,我的字符串如下所示:\ u201cHello World\u201d.

有谁知道如何才能正确显示我的角色?

我是否需要在某处执行一些额外的UTF-8编码?

谢谢,尼克.

python django utf-8

1
推荐指数
1
解决办法
1558
查看次数

标签 统计

cocoa-touch ×2

django ×1

iphone ×1

multithreading ×1

python ×1

rotation ×1

unix ×1

utf-8 ×1