小编Kri*_*dra的帖子

如何在不征得许可的情况下获取用户的当前位置?

任何人都可以告诉我如何获得用户的当前位置 - 纬度/经度信息而不征得他的许可?就像自动获取用户的位置一样?提前致谢.SHREYA

cocoa-touch core-location ios

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

每隔x秒以速度更新标签

我正在开发我的第一个iPhone应用程序.我必须每隔x秒用设备速度更新一个标签.我创建了自己的CLController,我可以获得设备速度,但我不知道是否必须使用NSTimer更新我的标签.我该怎么做?

cocoa-touch nstimer cllocation ios

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

Facebook注册

我需要将Facebook和Twitter按钮上的"分享"添加到我的iPhone应用程序中.在我得到任何进一步的,我必须去登记在Facebook上开发,在移动应用中,为了获得一个App ID(然后实现单点登录)?推特怎么样?

twitter cocoa-touch facebook ios

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

如何以编程方式获取设备的当前方向?

我想知道我使用的设备方向

 UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation
Run Code Online (Sandbox Code Playgroud)

但这仅在我改变方向时有效,否则它不会给出任何东西(TRUE/FALSE).那么即使方向没有改变,我怎样才能获得当前的设备方向.

提前致谢!

cocoa-touch orientation ios

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

Java integer ArrayList返回特定范围内的元素

我有一个整数的java ArrayList

ArrayList <Integer> ageList  = new ArrayList <Integer>();
Run Code Online (Sandbox Code Playgroud)

我在这个arrayList中有一些整数值.我想创建一个新的ArrayList,其中包含上面arrayList中传递条件的所有元素,例如25到35之间的值.即如果我的ageList包含值

{} 12,234,45,33,28,56,27

我的newList应该包含

{33,28,27}

我怎样才能做到这一点?

注意:我从目标C背景来到java,在那里我使用NSPredicate来轻松地做这样的事情.在Java中有类似的方法吗?

java search arraylist filter

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

按字符串删除所有重音符号

surnameField.text = "Fal à èà ò l'opo";    

// remove space and apostrophe
NSString *surnarmeInput = [[surnameField.text stringByReplacingOccurrencesOfString:@" " withString:@""] stringByReplacingOccurrencesOfString:@"'" withString:@""];
Run Code Online (Sandbox Code Playgroud)

我也会删除重音符号.

结果"Falaeaolopo"

objective-c ios

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

C字符串文字处理

程序崩溃的以下代码有什么问题 - 给出分段错误.我正在使用gcc.

uint8_t result = 1      

InsertRow("Name","Details of work",result);     

void InsertRow(char *Name, char *Description,uint8_t Result)   
{  
   char Buffer[500];  

   if(Result==1)   
      sprintf(Buffer,"<tr><td>%s </td> <td> %s </td> <td>  %s </td></tr>",Name,Description,Result);   
} 
Run Code Online (Sandbox Code Playgroud)

c string segmentation-fault

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

无需在MFMailComposeViewController中保存草稿


单击MFMailComposeViewController的取消按钮后,生成保存草稿的动作表.
在此输入图像描述


我不想要这个动作表我怎么能实现呢?
提前致谢.

cocoa-touch ios mfmailcomposer

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

"无效的图标路径" - Apple App Store团队返回错误

This is my first time submitting something to the App Store, and I am having a lot of issues. First off, let me say that the application has been built with PhoneGap, using the Cordova 1.9.0 framework. The web application end of it is fine, validates W3, and runs perfectly in browser. I have rebuilt this project from the ground up after being unable to fix the issue manually, but that did not rectify it either. Below is …

icons app-store ios

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

NSString\0

启动包含@"\ 0"的NSString的最佳方法是什么?

NSString* foo = @"bar\0";
Run Code Online (Sandbox Code Playgroud)

导致'CFString文字包含NUL字符'警告.

iphone objective-c nsstring ios

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