MFMessageComposeViewController显示消息体突出显示进行编辑(MFMessageComposeViewController show with message body highlighted for editing)
我们可以像这样创建和显示文本作曲家:
let controller = MFMessageComposeViewController() controller.body = messageText controller.recipients = numbers controller.messageComposeDelegate = self self.present(controller, animated: true, completion: nil)
是否有可能提供一个MFMessageComposeViewController与
body
突出显示,以便用户可以开始输入以输入新消息,如果他们不喜欢我们提供的默认消息?我查看了文档,但没有找到任何选项。
We can create and show a text composer like so:
let controller = MFMessageComposeViewController() controller.body = messageText controller.recipients = numbers controller.messageComposeDelegate = self self.present(controller, animated: true, completion: nil)
Is it possible to present an MFMessageComposeViewController with
body
highlighted so that the user can just start typing to enter a new message if they do not like the default message we have provided?I looked through the docs but did not find any options for this.
原文:https://stackoverflow.com/questions/41988788
满意答案
您正在使用数据框图函数创建新图形。 您应该传递要绘制第二个图的轴。 一种方法是使用
gca
来获取当前轴。以下应该工作(虽然没有测试):
plt.figure(figsize=(10,7)) img=imread('California.png') plt.imshow(img,zorder=0,extent=[housing['longitude'].min(),housing['longitude'].max(),housing['latitude'].min(),housing['latitude'].max()]) ax = plt.gca() housing.plot(x='longitude', y='latitude', kind='scatter', alpha=0.4, s= housing['population']/100, label='population', ax=ax, c= 'median_house_value', cmap=plt.get_cmap('jet'), colorbar=True, zorder=5) plt.legend() plt.show()
编辑:使用
imshow
的extent
参数以及经度和纬度数据的最小值和最大值将正确缩放图像。You are creating a new figure by using the dataframe plot function. You should pass the axes on which you want to draw your second plot. One way is to use
gca
to get the current axis.The following should work (not tested though):
plt.figure(figsize=(10,7)) img=imread('California.png') plt.imshow(img,zorder=0,extent=[housing['longitude'].min(),housing['longitude'].max(),housing['latitude'].min(),housing['latitude'].max()]) ax = plt.gca() housing.plot(x='longitude', y='latitude', kind='scatter', alpha=0.4, s= housing['population']/100, label='population', ax=ax, c= 'median_house_value', cmap=plt.get_cmap('jet'), colorbar=True, zorder=5) plt.legend() plt.show()
EDIT: using the
extent
parameter ofimshow
with the minimum and maximum values of your longitude and latitude data will scale the image correctly.
相关问答
更多Pyplot Scatter to Contour plot(Pyplot Scatter to Contour plot)
散点图移动标签(Scatter plot move labels)
在地图上叠加散点图(img)(Overlay scatter plot on map (img))
用散点图叠加直方图列(Overlay columns of histograms with scatter plots)
如何在图像上绘制散点图?(How to plot scatter plot on an image?)
使用散点图和世界地图图像在地图上显示流星撞击,宽高比问题(Using a scatter plot and world map image to display meteor impacts on a map, Aspect ratio problems)
在Excel中标记的散点图上的直线散布(Straight lined scatter over marked scatter plot in Excel [closed])
如何使用Scatter Plot highchart绘制下图?(How to draw following graph using Scatter Plot highchart?)
散点图和箱线图叠加(Scatter plot and boxplot overlay)
在3D散点图下方叠加地图(Overlay a map below a 3D scatter plot)
相关文章
更多Storm - Guaranteeing message processing
提交表单,显示遮罩层的问题
solr4.7开发实践 2——高亮显示
xhEditor利用prettify实现代码高亮显示
Android EditText软键盘显示隐藏以及“监听”
android高仿微信UI点击头像显示大图片效果
Android编程之仿微信显示更多文字的View
Android编程之仿微信显示更多文字的View
Eclipse中Hadoop的DFS Location无法显示DFS下的文件 解决方法
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!