小编tom*_*nas的帖子

如何在ios 6上创建和保存EKCalendar

我有一个问题,我创建我的EKCalendar,一切看起来不错,但是当我去列出我的日历时,它没有出现.我也去我的日历应用程序查看我的日历列表,但它不存在.有什么想法吗?

这是我创建日历的按钮代码:

- (IBAction)one:(id)sender {
NSString* calendarName = @"My Cal";
EKCalendar* calendar;

// Get the calendar source
EKSource* localSource;
for (EKSource* source in eventStore.sources) {
    if (source.sourceType == EKSourceTypeLocal)
    {
        localSource = source;
        break;
    }
}

if (!localSource)
    return;

calendar = [EKCalendar calendarWithEventStore:eventStore];
calendar.source = localSource;
calendar.title = calendarName;

NSError* error;
bool success= [eventStore saveCalendar:calendar commit:YES error:&error];
if (error != nil)
{
    NSLog(error.description);
    // TODO: error handling here
}
NSLog(@"cal id = %@", calendar.calendarIdentifier);
}
Run Code Online (Sandbox Code Playgroud)

这是我的按钮代码列出日历,但我的新日历从未包括在内!

- (IBAction)two:(id)sender {

NSArray …
Run Code Online (Sandbox Code Playgroud)

calendar objective-c ios ios6

14
推荐指数
2
解决办法
8007
查看次数

Youtube或Flash文件音频提取?

嘿大家,我想知道是否有一个网络语言(php,perl等)的当前类或库能够直接从flash文件或youtube链接中提取音频.

谢谢你的时间!

php youtube flash audio perl

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

从ng-click获取jQuery元素引用

我有一个半任意长度的ng-repeat和一个"tag along"元素,它根据一些标准进行渲染:

<div ng-repeat-start="day in [1,2,3,4,5,6,7] track by $index">my repeat</div>
<div ng-repeat-end ng-if="shouldRender(day)" class="maybe">maybe rendered</div>
Run Code Online (Sandbox Code Playgroud)

我想要做的是在重复元素上设置一个click事件,并引用NEXT SIBLING"可能渲染"元素,以便做一些jQuery魔术.所以我想要做的是添加ng-click="getNextMaybe(this)"并处理它以找到下一个兄弟.maybe元素.所以现在我有:

<div ng-repeat-start="day in [1,2,3,4,5,6,7] track by $index" ng-click="getNextMaybe(this)">my repeat</div>
<div ng-repeat-end ng-if="shouldRender(day)" class="maybe">maybe rendered</div>

function myCtrl($scope){
  $scope.getNextMaybe = function(repeatElem){
    var nextMaybe = $(repeatElem).next('.maybe');
  }
}
Run Code Online (Sandbox Code Playgroud)

我想我对this这个实例中的内容以及如何将其转换为jQuery对象以进行处理感到困惑.

谢谢!

angularjs

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

如何在iPhone上打开应用程序解锁

我正在尝试创建一个应用程序,每次用户解锁手机时弹出的应用程序就像第二个密码屏幕一样.

用户解锁手机 - >自定义安全应用程序打开 - >自定义安全应用程序关闭并将用户推送到主屏幕

这是否可以捕获手机解锁事件并打开您的应用程序?

谢谢!

iphone xcode ios ios5 ios6

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

标签 统计

ios ×2

ios6 ×2

angularjs ×1

audio ×1

calendar ×1

flash ×1

ios5 ×1

iphone ×1

objective-c ×1

perl ×1

php ×1

xcode ×1

youtube ×1