我正在使用LINQ-to-SQL类.它有一个方法object.InsertOnSubmit().但它返回void,所以我可以在插入记录后获得主键值.
我想要最近插入的记录的主键值.
我即将提交我的第一个iPhone应用程序.
我已经放了很多NSLog语句来测试和调试应用程序.
所以我的问题是"将NSLog语句保留在源代码中是否可以"
我怀疑nslog语句是否会减慢总执行时间.
谢谢.
我正在使用以下语句推送我的视图控制器:
[[self navigationController] pushViewController:self.customViewController animatedWithTransition:UIViewAnimationTransitionFlipFromLeft];
Run Code Online (Sandbox Code Playgroud)
现在当我按下后退按钮时,我想用uiviewanimationtransitionflipfromright来设置动画.
喜欢
[self.navigationController popViewControllerAnimatedWithTransition:UIViewAnimationTransitionFlipFromLeft];
Run Code Online (Sandbox Code Playgroud)
我怎么能这样做?
谢谢
我正在学习核心数据,特别是在聚合方面.
当前我想做的事情:在一些标准上计算表中与多对关系的记录数与反向关系.
目前我这样做:
NSExpression *ex = [NSExpression expressionForFunction:@"count:"
arguments:[NSArray arrayWithObject:[NSExpression expressionForKeyPath:@"ddname"]]];
NSPredicate *pred = [NSPredicate predicateWithFormat:@"ddtype == 'Home'"];
NSExpressionDescription *ed = [[NSExpressionDescription alloc] init];
[ed setName:@"countDDEvents"];
[ed setExpression:ex];
[ed setExpressionResultType:NSInteger16AttributeType];
NSArray *properties = [NSArray arrayWithObject:ed];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setPredicate:pred];
[request setPropertiesToFetch:properties];
[request setResultType:NSDictionaryResultType];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"DDEvent" inManagedObjectContext:[self.currentAccount managedObjectContext]];
[request setEntity:entity];
NSArray *results = [[self.currentAccount managedObjectContext] executeFetchRequest:request error:nil];
NSDictionary *dict = [results objectAtIndex:0];
NSLog(@"Average birthdate for female heroes: %@", [dict objectForKey:@"countDDEvents"]);
Run Code Online (Sandbox Code Playgroud)
它来自jeff …
目前,我正在通过“保存的相册”中的以下方法保存图像。
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
Run Code Online (Sandbox Code Playgroud)
现在,我想将当前的纬度和经度与该图像相关联。
我该怎么办?
我可以使用它的mediaInfo字典(元数据)吗?
我在ios SDK 3.0中工作。
请告诉我如何使用图像获取/设置地理数据 UIImageViewPickerController
我想用struts2在display标签中创建编辑,删除链接.我怎么能这样做?如果有人知道请帮帮我....
我这样做.
<display:column property="id" title="ID" href="details.jsp" paramId="id" />
Run Code Online (Sandbox Code Playgroud)
但链接不会发送到detail.jsp.它不会去任何地方.可能的原因是什么
我正在开发一个iPhone应用程序,这是一个位置感知应用程序.Currentlly应用程序正常工作,除了以前位置的缓存.我第一次启动应用程序位置管理器获取当前位置,然后根据当前位置显示附近的内容.
但从下一个它使用以前获取的位置,直到我重新启动手机它将获取相同的位置.所以到目前为止,我很清楚位置管理器会缓存该位置.
所以我的问题是如何删除此缓存并强制位置管理器获取新位置谢谢
今天下午我正在观看wwdc视频,我听到了Bonjour这个词.
所以我只想知道Apple中的Bonjour是什么.
这只是为了清除这个概念.
谢谢
我即将完成我的第一个iPhone应用程序.
我听说有些应用程序因使用某些私有API而被拒绝.
我也在使用一些私有API,如ASIHTTPRequest,MBProgressViewHUD.
因此,请告诉我这些或任何其他私有API被拒绝,我应该确保不要现在或将来的应用程序使用它们.
您可以列出它们,或者只是说明如何在使用私有API时采取预防措施.
我正在使用keyboardWasShown和keyboardWillBeHidden通知滑动视图以获得可见的文本视图.
我有一个UITabBar带有六个标签的应用程序.
在每个视图中我都在使用UINavigationController.
在每个UITableViewCell我使用键盘通知的详细视图中.
所以问题是键盘通知是我第一次使用.在其他选项卡上它将无法正常工作.
代码如下:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWasShown:)
name:UIKeyboardDidShowNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWasHidden:)
name:UIKeyboardDidHideNotification
object:nil];
Run Code Online (Sandbox Code Playgroud)
和方法
- (void)keyboardWasShown:(NSNotification *)aNotification {
if ( keyboardShown )
return;
NSDictionary *info = [aNotification userInfo];
NSValue *aValue = [info objectForKey:UIKeyboardBoundsUserInfoKey];
CGSize keyboardSize = [aValue CGRectValue].size;
NSTimeInterval animationDuration = 0.300000011920929;
CGRect frame = self.view.frame;
frame.origin.y -= keyboardSize.height-100;
frame.size.height += keyboardSize.height-100;
[UIView beginAnimations:@"ResizeForKeyboard" context:nil];
[UIView setAnimationDuration:animationDuration];
self.view.frame = frame;
[UIView commitAnimations];
viewMoved = YES; …Run Code Online (Sandbox Code Playgroud) iphone ×8
aggregation ×1
animation ×1
app-store ×1
bonjour ×1
caching ×1
cllocation ×1
conceptual ×1
core-data ×1
count ×1
displaytag ×1
geolocation ×1
java ×1
linq-to-sql ×1
nslog ×1
struts2 ×1