我有一个带有.localConcertsfetched属性的Artist对象(基本上是完整.set的子concerts集),我可以在NSFetchedResultsController谓词中使用该属性吗?
这是我正在尝试的:
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Artist" inManagedObjectContext:context];
[request setEntity:entity];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"localConcerts.@count > 0"];
[request setPredicate:predicate];
fetchedResultsController = [[NSFetchedResultsController alloc]
initWithFetchRequest:request
managedObjectContext:context
sectionNameKeyPath:nil
cacheName:nil];
Run Code Online (Sandbox Code Playgroud)
但是我得到了:
'keypath localConcerts not found in entity <NSSQLEntity Artist id=1>'
Run Code Online (Sandbox Code Playgroud)
我错过了什么,或者只是不可能在谓词中使用获取的属性?
现在只记录以下内容logs/delayed_job.log:
2012-04-20T03:57:44+0000: Cacher completed after 5.3676
2012-04-20T03:57:44+0000: 1 jobs processed at 0.1744 j/s, 0 failed ...
Run Code Online (Sandbox Code Playgroud)
我正在尝试做的是让它也记录我puts和我的SQL查询,就像在开发模式下一样,除了它仍然被记录log/delayed_job.log.
我尝试添加以下initializers/delayed_job_config.rb但没有运气:
Delayed::Worker.logger = Rails.logger
Delayed::Worker.logger.level = Logger::DEBUG
Run Code Online (Sandbox Code Playgroud)
(我的所有内容puts现在都已记录,但没有更多的作业状态日志,仍然没有SQL查询)
我希望它能够动画,所以我正在使用它 [UIView beginAnimations]
我尝试过使用动画button.imageView.frame(图像设置为imageView),但它只是动画显示位置,图像根本没有按比例缩小.
使用hateButton.frame(当图像设置为backgroundImage时),backgroundImage按比例缩小但不是动画.
如何动画缩放UIButton图像?
我想drawMapRect:zoomScale:inContext:根据Google Maps使用的映射平台的标准[0-20]缩放级别编写一些绘图规则,但我似乎无法找到将MKZoomScale转换为该范围的公式.任何接受者?
iphone ×2
core-data ×1
ios ×1
logging ×1
mapkit ×1
predicates ×1
ruby ×1
uibutton ×1
uiimage ×1
uiimageview ×1