小编sea*_*iao的帖子

如何查看静态库文件的编译平台

我有一个静态库文件.如何查看它是在i386中还是在arm平台中编译的.谢谢.

c unix macos

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

如何在XCode 4.2中一起使用c ++和objective-c

在开发iPhone应用程序时,我很难将c ++和objective-c结合起来.我在应用程序中使用了第三方库.我有一个计划使用c或c ++来包装库,然后使用objective-c来调用它.用c ++完成课程后,我在objective-c中使用它时遇到了麻烦.有没有示例代码?谢谢.

在objective-c头文件中.我写

#import <UIKit/UIKit.h>
#import "ZJTConstants.h"
#include "TTSAdapter.h"

class Adapter;
@interface ZJTVBlogViewController : UIViewController {
@private
    Adapter* adapter;
}
@end
Run Code Online (Sandbox Code Playgroud)

在mm文件中,我写道:

if (self) {
    adapter = Adapter::getInstance();
    // Custom initialization
}
Run Code Online (Sandbox Code Playgroud)

是写吗?

c++ objective-c ios xcode4.2

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

fosn在ios上的奇怪行为

我试图通过fopen创建一个文件然后写它,但奇怪的事情发生了.

  1. 当我将iphone插入USB端口时.一切正常.按预期在tmp目录或文档目录中创建文件.
  2. 当我插上设备并执行相同操作时,文件没有出现.我想知道为什么.

我使用fopen来创建文件.在我的情况下,我应该这样做来创建然后写文件.调用是fopen(pcm_output,"wb +");

c objective-c ios

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

有关iOS上的本地通知的问题

我现在在应用程序中使用本地通知,但我发现一些奇怪的东西.

我设置并安排了这样的通知.

UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil) {
    return;
}
NSDate *now = [[NSDate alloc] init];
now = [now dateByAddingTimeInterval:dayToFinish * 24 * 60 * 60];
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSHourCalendarUnit fromDate:now];

components = [[NSCalendar currentCalendar] components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit fromDate:now];
int month = [components month];
int day = [components day];
int year = [components year];

NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
NSDateComponents *dateComps = [[NSDateComponents alloc] init];
[dateComps setYear:year];
[dateComps setMonth:month];
[dateComps setDay:day]; …
Run Code Online (Sandbox Code Playgroud)

objective-c ios uilocalnotification

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

标签 统计

ios ×3

objective-c ×3

c ×2

c++ ×1

macos ×1

uilocalnotification ×1

unix ×1

xcode4.2 ×1