小编Har*_*oon的帖子

iOS 10的Facebook登录问题

我用facebook登录我的应用程序.尝试使用Facebook登录iOS 10,iPhone模拟器6s.

-canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

10814 : kLSApplicationNotFoundErr
-10814  No application in the Launch Services database matches the input criteria.
Run Code Online (Sandbox Code Playgroud)

我正在使用facebook sdk版本4.13.1. 在XCode 8之前,相同的代码工作正常.

任何帮助?提前致谢.

facebook ios-simulator facebook-login ios10 xcode8

11
推荐指数
2
解决办法
8539
查看次数

如何获得std :: string的准确长度?

我正在std::string使用此代码修剪一个long 以使其适合文本容器.

std::string AppDelegate::getTrimmedStringWithRange(std::string text, int range)
{
    if (text.length() > range)
    {
        std::string str(text,0,range-3);
        return str.append("...");
    }
    return text;
}
Run Code Online (Sandbox Code Playgroud)

但在其他语言的情况下,如HINDI "??????"长度std::string是错误的.

我的问题是如何在所有测试用例中检索std :: string的准确长度.

谢谢

c++ string std

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

使用UITextField swift 3.0中的数字键盘以dd-MM-yyyy格式输入日期

我想在进入UITextField时格式化(dd-MM-yyyy)文本,我使用swift 3.0,任何建议我如何实现相同的.

iphone objective-c ios swift swift3

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