我有一个应用程序,并希望发布它的Lite版本,以提高可见性,让人们有机会先尝试.人们可以下载Lite版本,然后通过应用内购买升级到专业版,或者他们可以立即从应用商店购买专业版.
实现这一目标的最优雅方法是什么,以便最小化代码维护?有没有办法在单个XCode项目中实现它?
我想在standardUserDefaults中实现一个bool标志,当设置为YES时解锁升级(这是Lite版本).
然后对于Pro版本,我的想法是在Info.plist文件中包含BOOL标志.
执行"我是精简版或专业版"的代码然后只需要检查是否存在上述任何一个标志,并且我可以维护一个XCode项目 - 只要我在菜单或任何地方添加适当的逻辑隐藏Pro功能 - 但这对发布到应用商店有什么影响?
我是否认为在发布时,我只需要在提交之前编辑Bundle ID和Info.plist?
其他人如何解决这个问题?这是我第一次这样做,所以很想听听有经验的人的一些意见.
我需要在iphone的accessoryTypetableview中accessoryType点击一下UITableView.我可以找到点击进入iphone.
这是我在iphone中使用CALayer,Core Animation框架编写3D立方体的第二个问题,用Objective-c编写.对于我的第一个问题,请访问这里3D立方体问题!第1部分.
我正在使用Brad Larsons代码从此链接旋转我的3D立方体
http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball
问题是我的立方体沿x轴旋转,沿着图中所示的粉红线.

但我想沿着图中所示的黑线围绕x轴旋转它.
现在在我的代码中我没有在我的视图上绘制任何粉红色线条或黑色线条,所以有人可以帮助我.
如果它有帮助,这里是用于在touchesMoved:方法中旋转我的立方体的代码
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
CGPoint location = [[touches anyObject] locationInView:self];
CATransform3D currentTransform = currentLayer.sublayerTransform;
CGFloat displacementInX = location.x - previousLocation.x;
CGFloat displacementInY = previousLocation.y - location.y;
CGFloat totalRotation = sqrt(displacementInX * displacementInX + displacementInY * displacementInY);
CGFloat x = (displacementInX/totalRotation) * currentTransform.m12 + (displacementInY/totalRotation) * currentTransform.m11;
CATransform3D rotationalTransform = CATransform3DRotate(currentTransform, totalRotation * M_PI / 180.0, x, y, 0);
currentLayer.sublayerTransform = rotationalTransform;
}
Run Code Online (Sandbox Code Playgroud)
previousLocation是一个CGPoint初始化的 …
我正在创建一个聊天应用程序,我通过uitableview中的单元格显示每条消息.但是,每次重新加载tableview时,它都会显示第一个单元格中的内容.我想安排我的表,这样当它重新加载时,它会一直"滚动",从而显示最新的消息.
我已经对文档进行了一些研究,但我对编程非常新,所以我不知道如何设置它.我想我需要reloadRowsAtIndexPaths方法,但我不知道如何实现它.谢谢!
我正在创建一个MKMapView应用程序,需要在plist中保存一些MKMapRect类型变量,以便在需要时引用它们.
我知道MKMapRect有MKMapPoint origin和MKMapSize size.并且它们每个都有2个可以保存的双值,nsnumber但保存它们似乎是很多工作,最重要的是我必须读回值并将它们转换为MKMapRect变量.
所以我的问题是,有没有简单的方法来存储MKMapRect并从plist中回溯它.
谢谢,
罗宾.
我想制作类似于会说话的汤姆猫,触摸宠物猫/,虚拟猴子和自来水动物园的应用程序.
我对Iphone基本动画有所了解.
我想知道我可以在没有OpenGL,cocos和其他游戏环境的情况下制作这些应用程序...我可以通过仅使用基本框架来制作它...
我想知道这个日期格式是什么Friday, December 18th,也是这个标准的日期格式,或者我需要付出一些努力才能得到这个.
谢谢.
[NSTimer scheduledTimerWithTimeInterval: target: selector: userInfo: repeats:NO];
Run Code Online (Sandbox Code Playgroud)
当重复:设置为NO时,是否需要使指定选择器内的计时器无效?
谢谢
编辑
另一个问题,如果它自我失效,
你如何正确取消这样的计时器?
由于无效已经失效的计时器会崩溃我假设?
维护一个指向计时器的指针,并将其设置为将被触发的选择器内的nil?
请你帮助我好吗 ?
我正在设置UILocalNotification,当我尝试设置其userInfo字典时,它会崩溃.fetchedObjects包含88个对象.
这是代码:
NSDictionary* myUserInfo = [NSDictionary dictionaryWithObject: fetchedObjects forKey: @"textbody"];
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil)
return;
// défining the interval
NSTimeInterval oneMinute = 60;
localNotif.timeZone = [NSTimeZone localTimeZone];
NSDate *fireDate = [[NSDate alloc]initWithTimeIntervalSinceNow:oneMinute];
localNotif.fireDate = fireDate;
localNotif.userInfo = myUserInfo; //this is the line that crashes the app
[fetchedObjects release];
Run Code Online (Sandbox Code Playgroud)
而控制台给了我这个:
Property list invalid for format: 200
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'unable to serialize userInfo: (null)'
Run Code Online (Sandbox Code Playgroud)
任何的想法 ?
我想uilocalnotification在我的应用程序中实现.但问题是它没有在确切的时间开火.它是在给定的射击时间30-40秒后射击.是否有我缺少的东西或这是一个常见的想法UILocalNotification.
谢谢
iphone ×10
objective-c ×9
ios ×5
nsdate ×2
app-store ×1
calayer ×1
cube ×1
dictionary ×1
gamekit ×1
invalidation ×1
map ×1
mapkit ×1
plist ×1
scroll ×1
timer ×1
uitableview ×1