标签: title

更改UINavigationBar字体属性?

我在UIViewController视图中添加了UINavigationBar.我想更改字体属性.请注意,我想更改UINavigationBar而不是控制器.在我使用UINavigationController的应用程序中,我用它self.navigationItem.titleView = label;来显示自定义标签.

如何在UINavigationBar中获得自定义标题?

PS我用它来设置self.navBar.topItem.title = @"Information";我的UINavigationBar 的标题文本.

fonts cocoa-touch objective-c title uinavigationbar

43
推荐指数
4
解决办法
4万
查看次数

从title ="工具提示文本"设置原生工具提示样式

我有一个具有title属性的input元素,当然这将带有工具提示和属性值的消息.

出于某种原因,此工具提示需要使用css进行样式设置.

怎么做到呢?我不知道它将在哪个容器中呈现,我对此一无所知.它也不能被firebug的开发工具访问

css input tooltip title

43
推荐指数
0
解决办法
8万
查看次数

当标题是变量名时,如何向ggplot添加标题?

在ggplot结束时,这很好用:

+ opts(title = expression("Chart chart_title..."))
Run Code Online (Sandbox Code Playgroud)

但这不是:

chart_title = "foo"
+ opts(title = expression(chart_title))
Run Code Online (Sandbox Code Playgroud)

也不是这样

chart_title = "foo"
+ opts(title = chart_title)
Run Code Online (Sandbox Code Playgroud)

当标题是变量名时,如何向ggplot添加标题?

r title ggplot2

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

标题属性的最大长度

HTML title属性的长度限制是多少?

<span title="some big long piece of text and is there any limit to its size?" />
Run Code Online (Sandbox Code Playgroud)

编辑:

我的问题特定于title属性不是一般的

html title

41
推荐指数
4
解决办法
5万
查看次数

如何在默认主题(Theme.Holo.Light)中将ActionBar中心的标题对齐

我搜索了很多但找不到方法,如何在ActionBar的中心设置标题,而不是左对齐.我使用下面的代码将标题设置在中心:

ViewGroup decorView= (ViewGroup) this.getWindow().getDecorView();
LinearLayout root= (LinearLayout) decorView.getChildAt(0);
FrameLayout titleContainer= (FrameLayout) root.getChildAt(0);
TextView title= (TextView) titleContainer.getChildAt(0);
title.setGravity(Gravity.CENTER);
Run Code Online (Sandbox Code Playgroud)

但它给出了如下错误:

ClassCastException : com.android.internal.widget.ActionBarView can not 
be cast to android.widget.TextView.
Run Code Online (Sandbox Code Playgroud)

任何其他解决方案..任何帮助将不胜感激.

android center alignment title android-actionbar

41
推荐指数
4
解决办法
10万
查看次数

高亮显示UIButton标题颜色 - 如何关闭它?

我创建了一个按钮.标题的颜色默认为黑色.但是当我按下它时,颜色会变成蓝色,再也不会变回来,这是怎么发生的?谁能告诉我为什么?我希望按钮的标题始终保持黑色.我怎样才能做到这一点?我试过了

[button setTitleColor:[UIColor darkTextColor] forState:UIControlStateHighlighted];
[button setTitleColor:[UIColor darkTextColor] forState:UIControlStateSelected];
Run Code Online (Sandbox Code Playgroud)

但是没有效果.当我在我的代码中添加它时,按钮的标题似乎总是蓝色.

代码如下.

UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setFrame:CGRectMake(20, 360, 280, 44)];
[button setTitle:NSLocalizedString(@"Continue", @"Label: TextLabel in Continue button") forState:UIControlStateNormal];
button.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:20.0f];
button.titleLabel.textColor = [UIColor darkTextColor];
button.titleLabel.shadowColor = [UIColor blackColor];
button.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleWidth;

[self.view addSubview:button];
[button release];
Run Code Online (Sandbox Code Playgroud)

感谢大家.我解决了这个问题.我认为根本原因是

button.titleLabel.textColor = [UIColor darkTextColor];
Run Code Online (Sandbox Code Playgroud)

当我删除它,并使用

button setTitleColor:(UIColor) forState:(UIControlState);
Run Code Online (Sandbox Code Playgroud)

问题已经解决了!

title textcolor uibutton ios

40
推荐指数
4
解决办法
4万
查看次数

表达式()中的换行符?

我在R中有以下直方图:

hist(alpha,cex.main=2,cex.axis=1.2,cex.lab=1.2,
main=expression(paste("Histogram of ",hat(mu), ", Bootstrap samples, Allianz")))
Run Code Online (Sandbox Code Playgroud)

标题太长了,所以我想换线.根据这个线程,我试过

hist(alpha,cex.main=2,cex.axis=1.2,cex.lab=1.2,
main=expression(paste("Histogram of ",hat(mu), ",cat("\n") Bootstrap samples, Allianz")))
Run Code Online (Sandbox Code Playgroud)

要么

hist(alpha,cex.main=2,cex.axis=1.2,cex.lab=1.2,
main=expression(paste("Histogram of ",hat(mu), cat("\n"),", Bootstrap samples, Allianz")))
Run Code Online (Sandbox Code Playgroud)

但两者都不起作用,我怎样才能在paste()中获得换行符?

plot r line-breaks title plotmath

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

WordPress wp_title在索引页面上留空

我是WordPress的新手,刚刚安装了3.3.1版本.

我做了一些关于这个问题的谷歌搜索,并找到了一些答案,但它们与版本2.7相关,并且是2-3岁.

基本上,该wp_title功能在每个页面上工作正常,除了我的主页,它返回空白,我没有任何标题.我可以硬编码标题,但我宁愿不这样做.

有罪的代码行:

<title><?php wp_title ( '| So Fresh n\' So Clean', true,'right' ); ?></title>
Run Code Online (Sandbox Code Playgroud)

我找不到有关3.3.1中发生的这个问题的任何事情,所以很清楚我做错了什么.

wordpress title

38
推荐指数
4
解决办法
4万
查看次数

SEO标题vs alt与文本

链接中的title属性是否可以完成SEO链接中真实文本的工作?即

<a href="..." title="Web Design">Web Design</a>
Run Code Online (Sandbox Code Playgroud)

是这样的:

<a href="..." title="Web Design">click here</a>
Run Code Online (Sandbox Code Playgroud)

什么时候试图获得像"网页设计"这样的关键词的良好网页排名?它是否像图像标签中的alt属性?或者它在SEO中无用吗?

是这样的:

<a href="..." alt="Web Design">click here</a>
Run Code Online (Sandbox Code Playgroud)

以上所有之间有什么区别?

先感谢您!

html seo title alt

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

aria-label和title属性有什么区别?

我习惯使用title=""我的链接/按钮/ ...上的属性来详细说明它们.但aria-label=""据我所知,bootstrap使用了很多属性,出于可访问性的原因.

所以我来创建按钮,如:

<button
    id="show-raw-result"
    class="btn btn-default btn-sm btn-twigfiddle"
    title="Result was not easily readable so it has been automatically cleaned up, use this button to see the result raw"
    aria-label="Result was not easily readable so it has been automatically cleaned up, use this button to see the result raw">
    <span class="glyphicon glyphicon-asterisk"></span> Show raw result
</button>
Run Code Online (Sandbox Code Playgroud)

但复制/粘贴标题以创建一个咏叹调标签看起来很丑陋.我应该选择哪一个,为什么?

html title wai-aria twitter-bootstrap

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