请提出解决方案。 我在Xcode 10 Swift 3中使用MMDrawerController作为导航抽屉菜单。 滑动时显示OKAY,但按下按钮时抽屉菜单不显示。 我在那个按钮上做了IBAction,如下所示:
#-- Plots
plots <- list()
combinations <- combn(dim(ssgsea.diff)[2],2)
for (i in 1:dim(combinations)[2]){
fit <- lm(ssgsea.diff[,combinations[1,i]] ~ ssgsea.diff[,combinations[2,i]],
data = ssgsea.diff)
plot1 <- ggplot(ssgsea.diff) +
aes(ssgsea.diff[,combinations[1,i]], ssgsea.diff[,combinations[2,i]]) +
geom_point()
plot1 <- plot1 +
labs(x = names(ssgsea.diff)[combinations[1,i]],
y = names(ssgsea.diff)[combinations[2,i]]) +
geom_smooth(method="lm", col = "red") +
labs(title = paste("Adj R2 = ", signif(summary(fit)$adj.r.squared, 5),
" Slope =",signif(fit$coef[[2]], 5),
" Pval =",signif(summary(fit)$coef[2,4], 5)))
plots[[i]] <- plot1
}
当从登录视图通过登录按钮跳入中央屏幕时,登录按钮IBAction的代码如下:
@IBAction func onNavTapped(_ sender: Any) {
let appDelegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.centerContainer?.toggle(MMDrawerSide.left, animated: true, completion: nil)
}