小编Wil*_*Hua的帖子

在通话状态栏中(无法满足约束条件)

就像这个问题:自动布局和通话中状态栏和这个问题:调整通话状态栏的大小?,我在调用状态栏中遇到问题,搞砸了我的视图布局.

这是我的嵌套结构.我有一个嵌套在另一个ViewController中的自定义模态ViewController.每当显示In Call Status Bar(然后关闭)时,会发生以下情况:

在此输入图像描述

下面是显示In Call Status Bar之前应该是什么样子的图片:

在此输入图像描述

发生错误后状态栏的背景蓝色是根视图控制器的背景颜色.

每当显示"呼叫状态栏"时,将打印出以下错误:

Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for …
Run Code Online (Sandbox Code Playgroud)

statusbar uiviewcontroller ios

32
推荐指数
3
解决办法
4570
查看次数

Apple推送通知身份验证密钥(沙箱和生产)

我最近在为给定的iOS客户端创建证书时注意到了一个新选项.

该选项标题为

Apple推送通知身份验证密钥(沙箱和生产)

获取身份验证密钥以生成服务器端令牌.您可以使用这些令牌替代通知请求的证书.

一个身份验证密钥可用于多个应用程序,并且不会过期.

如何设置它?

iphone push-notification ios swift

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

Swift中的可选默认参数

我在swift中有一个带默认参数的函数

func test(string: String = "", middleString: String = "", endString: String = "") -> Void {
  // do stuff
}
Run Code Online (Sandbox Code Playgroud)

我想传入将成为可选字符串的变量

let string: String? // 
let middleString: String?
let endString: String?
Run Code Online (Sandbox Code Playgroud)

如何使参数为nil,使用默认参数.如果没有,则使用选项中的值

test(string, middleString: middleString, endString: endString)

ios swift

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

如何通过Google Plus API向人们发送电子邮件?

根据Google Plus的说法,您可以通过电子邮件发送圈子中的Google Plus用户:请参阅此处

  • 如果您拥有用户ID,如何使用Google Plus API(或Gmail API)向圈内用户发送电子邮件?
  • 如果你不能这样做,你如何通过环聊向他们发送消息?

gmail google-plus hangout

13
推荐指数
1
解决办法
306
查看次数

无法执行Node.js Cloud9

我想在服务器上使用Cloud9 IDE.我添加了SSH密钥,一旦我尝试SSH到服务器的错误消息

Could not execute node.js on root@xxx.xxx.xxx.xxx
Run Code Online (Sandbox Code Playgroud)

出现.

我在服务器上安装了nodejs,v0.10.25

cloud9-ide

9
推荐指数
2
解决办法
3564
查看次数

childViewControllerForStatusBarHidden用于隐藏

我试图隐藏我状态栏的一半.具体来说,我正在使用REFrostedViewController作为我的侧抽屉,当它出来时,我希望它能够超越状态,例如在这张图片中(应用程序是谷歌的收件箱).

在此输入图像描述

UIViewController的当前层次结构如下:

- REFrostedViewController
 |--MenuViewController
 |--NavigationControler
    |--ContentViewController
Run Code Online (Sandbox Code Playgroud)

我已经UIViewControllerBasedStatusBarAppearance开始了YES.在我的抽屉菜单(MenuViewController)中我有方法

- (BOOL)prefersStatusBarHidden
{
    return YES;
}
Run Code Online (Sandbox Code Playgroud)

在我的导航控制器中,我有:

- (UIViewController *)childViewControllerForStatusBarHidden {
    return self.frostedViewController.menuViewController;
}
Run Code Online (Sandbox Code Playgroud)

这会在所有屏幕中隐藏状态栏.当我做

- (UIViewController *)childViewControllerForStatusBarHidden {
    if (self.isDrawerOpen) 
    {
        return self.frostedViewController.menuViewController;
    } else {
        return self.frostedViewController.contentViewController;
    }
}
Run Code Online (Sandbox Code Playgroud)

它崩溃了.self.frostedViewController.contentViewController拥有一个navigationController(也有prefersStatusBarHidden实现的方法)

statusbar drawer ios

6
推荐指数
0
解决办法
1574
查看次数

GMSMapView阻止UIScrollView滚动

我有一个嵌套在UIScrollView中的GMSMapView.我已经关闭了GMSMapView的滚动功能

mapView.settings.tiltGestures = false
mapView.settings.scrollGestures = false
mapView.settings.rotateGestures = false
Run Code Online (Sandbox Code Playgroud)

但是,每当我尝试滚动视图时意图UIScrollView将滚动,没有任何反应.我该怎么做才能解决这个问题?

ios google-maps-sdk-ios swift

6
推荐指数
2
解决办法
2189
查看次数

如何在Firebase控制台中使用APN Auth Key .p8证书

如何使用Firebase使用Apple的新Auth Key p8文件发送推送通知?

我知道如何使用Apple的旧p12文件继续发送推送通知,但想升级到新的Auth Key.

这是我能找到的唯一其他资源(不回答问题): 如何在firebase控制台中使用Apple的新.p8证书进行APN

push-notification apple-push-notifications firebase

6
推荐指数
1
解决办法
3450
查看次数

嵌入导航控制器的目的是什么?

我最近一直在学习iOS开发,一位朋友告诉我,将视图嵌入导航控制器是一种好习惯。是真的,如果是,为什么呢?

将视图控制器嵌入导航控制器与仅将视图控制器单独放置相比有什么变化?

navigationcontroller ios ios7

5
推荐指数
1
解决办法
1248
查看次数

python3.3 matplotlib无法导入名称_tkagg

我的matplotlib的默认后端是'agg'.我在stackoverflow上读到(如何在Python中设置matplotlib中的'后端'?)为了显示图形,我需要使用TkAgg,WX,QTAgg或QT4Agg.我尝试使用全部4(mpl.use('TkAgg')等),matplotlib找不到任何一个(我不能使用QTAgg或QT4Agg,因为根据matplotlib它与python3不兼容).我不确定有什么问题,因为当我去/usr/local/lib/python3.3/dist-packages/matplotlib/backends/时,tkagg.py和backend_tkagg.py都在那里.这些错误也适用于wx.

如果有任何相关性,我在Quantal上使用python3.3.

python matplotlib python-3.x

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