首页 \ 问答 \ xcode提醒样式,swift 3(xcode alert style, swift 3)

xcode提醒样式,swift 3(xcode alert style, swift 3)

所以我有一个应用程序在一段时间后触发本地通知。 唯一的问题是,我需要一旦警报通知成为实际警报而不是横幅弹出的警报样式。 从我研究的内容中,我发现您可以向用户请求更改通知格式的功能(很像请求使用通知)。 但是,我不确定如何在代码中实现这一点。 有没有人有任何想法,我可以如何实现这一目标? 非常感谢这个话题的任何帮助。


so I have an app which fires a local notification after a certain amount of time. The only problem is that I require the alert style which pops up once the notification goes off to be an actual alert not a banner. From what I've researched I've found that you can request from the user, the ability to change the format of the notification (very much like requesting the use of notifications). I am however, unsure of how to implement this in code. Does anyone have any ideas as to how I can achieve this? Any help on the topic is very much appreciated.


原文:https://stackoverflow.com/questions/42037297
更新时间:2024-05-03 09:05

最满意答案

如果要对同一服务上的两个站点使用相同的端口,则只需要一个角色并将其设置为两个站点并为第二个站点设置主机头(在您的情况下我建议使用api.test) .COM)。 有关MSDN的完整文档 。 所以你的服务定义应该是这样的:

<WebRole name="Test" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="HttpInput" />
          <Binding name="Endpoint1" endpointName="HttpsInput" />
        </Bindings>
      </Site>
      <Site name="Api" physicalDirectory="[Relative Path to Published API">
        <Bindings>
          <Binding name="ApiEndpoint" endpointName="HttpsInput" hostHeader="api.test.com" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="HttpInput" protocol="http" port="80" />
      <InputEndpoint name="HttpsInput" protocol="https" port="443" certificate="SSL" />
    </Endpoints>

If you want to use the same port for two sites on the same service, you need to have just one role and set it up with two sites and set a host header for the second site (in your case I'd recommend api.test.com). There is full documentation on MSDN. So your service definition should look something like this:

<WebRole name="Test" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="HttpInput" />
          <Binding name="Endpoint1" endpointName="HttpsInput" />
        </Bindings>
      </Site>
      <Site name="Api" physicalDirectory="[Relative Path to Published API">
        <Bindings>
          <Binding name="ApiEndpoint" endpointName="HttpsInput" hostHeader="api.test.com" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="HttpInput" protocol="http" port="80" />
      <InputEndpoint name="HttpsInput" protocol="https" port="443" certificate="SSL" />
    </Endpoints>

相关问答

更多
  • 这是我做的: 获取SSL证书并将证书文件保存到我的Wordpress项目的根目录。 将以下内容添加到wp-config.php : define('DB_SSL', true); 将其添加到我的wp-includes/wp-db.php的函数db_connect()中。 必须在mysqli_real_connect()之前调用它: // Just add this line mysqli_ssl_set($this->dbh, NULL, NULL, ABSPATH . 'BaltimoreCyberTr ...
  • 配置基于IP的SSL后,Azure Web App将为您的Web应用程序创建一个新的专用IP地址。 请打开您的网站应用程序的自定义域名页面以获取最新的IP地址并重新映射它或您的A记录。 另外,我发现还有一个额外的'。'。 在CNAME记录绑定的末尾。 mebellete.azurewebsites.net. 请改变它 mebellete.azurewebsites.net After configured the IP based SSL, Azure Web App will create a new ...
  • 在同一个Azure Web App上托管不同的插槽 首先,你需要定义你的第二个插槽。 这可以通过导航到Web App的管理刀片,然后单击Deployment Slots菜单选项在门户中完成。 一旦定义了一个插槽,您可以在“部署插槽”菜单下单击它,然后您将被带到一个完全独立的插槽的“概述”选项卡中。 请注意,在此页面上,您可以下载完全独立的插槽的发布配置文件。 在同一个Visual Studio解决方案中有两个Web应用程序,您可以右键单击每个Web应用程序,选择“发布”,然后使用主要或插槽发布配置文件确定每 ...
  • 最低要求: (如果CNAME足够好,你甚至不需要awverify - awverify仅适用于A) 流量管理器端点: 确保您的DNS配置看起来像这样(使用tm.snobu.org而不是www.bloop.com ): $ dig tm.snobu.org tm.snobu.org. 3397 IN CNAME simpletm.trafficmanager.net. simpletm.trafficmanager.net. 97 IN CNAME ap ...
  • 如果要对同一服务上的两个站点使用相同的端口,则只需要一个角色并将其设置为两个站点并为第二个站点设置主机头(在您的情况下我建议使用api.test) .COM)。 有关MSDN的完整文档 。 所以你的服务定义应该是这样的:
    有两种方法可以部署新的webrole: 重新部署 就地更新 第一个是最慢的,意味着新VM被启动。 使用inplace upgrade( https://azure.microsoft.com/en-us/documentation/articles/cloud-services-update-azure-service/ )新的应用程序包安装在新驱动器上(通常是F:而不是E :)和IIS网站交换到新驱动器。 您可以通过转到旧门户并上传新的应用程序包来尝试此操作。 只需几秒钟/分钟即可完成更新。 After ...
  • 虽然你没有自己的证书,但是如果某人正在打你不打算支持的计划,那么对他们来说并不是很有趣。 目前,他们将获得azurewebsites.net的Azure通配符证书,当然,这对于mydomain.com(或其他)无效,他们将从浏览器获得令人讨厌的安全警告。 尝试从HTTPS重定向到HTTP没有意义,因为他们仍然会在HTTPS请求上收到浏览器警告。 您也无法在Azure网站上禁用HTTPS方案,这是集中配置的一项功能,而不是您可以打开或关闭的功能。 您最好的办法是只需将免费的SSL证书加载到对您的域名有效的网站 ...
  • 对于自定义域,您仍然需要购买自己的SSL证书,非自定义域支持https免费(“网站为'azurewebsites.net'域下的所有URL提供SSL连接,无需额外费用。安全访问您的网站https://.azurewebsites.net。“) 此链接将向您展示如何在为您的域购买自定义SSL后添加自定义SSL。 For a custom domain you will still have to purchase your own SSL certificate, https is supported on ...
  • 我想说这是Windows Azure SDK的一个已知问题,目前正在进行中。 我没有关于修复程序可用性的任何具体细节,也无法对此进行评论。 上面已经有一些手动发布包的解决方法,但是如果你想在工具集中解决问题,你可以在构建步骤中转换CSDEF / CSCFG配置文件,如下所述: http://blogs.msdn.com/b/philliphoff/archive/2012/07/02/transform-windows-azure-service-model-files-during-packaging.a ...
  • 这是一点意见,但我认为你有权利。 为所有角色部署单个程序包(原子更新,版本控制等)当然有优势。 但是,在更复杂的场景中,我发现拆分为不同的部署,托管服务运行良好。 如果您需要地理冗余,则无论如何都必须进行不同的部署。 如果您对版本控制小心(假设您的部署进行通信),您可以轻松地进行不同的部署并获得更快部署的好处。 我们发现我们的工作者角色的部署率比我们的Web角色高得多,因此将Web角色拆分出来是有意义的。 使用新的Windows Azure网站功能,我们正在认真考虑将它们拆分出来,并简单地运行我们应用程序的 ...

相关文章

更多

最新问答

更多
  • sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
  • 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
  • AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
  • Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
  • 湖北京山哪里有修平板计算机的
  • SimplePie问题(SimplePie Problem)
  • 在不同的任务中,我们可以同时使用多少“上下文”?(How many 'context' we can use at a time simultaneously in different tasks?)
  • HTML / Javascript:从子目录启用文件夹访问(HTML/Javascript: Enabling folder access from a subdirectory)
  • 为什么我会收到链接错误?(Why do I get a linker error?)
  • 如何正确定义析构函数(How to properly define destructor)
  • 垂直切换菜单打开第3级父级。(Vertical toggle menu 3rd level parent stay opened. jQuery)
  • 类型不匹配 - JavaScript(Type mismatch - JavaScript)
  • 为什么当我将模型传递给我的.Net MVC 4控制器操作时,它坚持在部分更新中使用它?(Why is it that when I pass a Model to my .Net MVC 4 Controller Action it insists on using it in the Partial Update?)
  • 在使用熊猫和statsmodels时拉取变量名称(Pulling variable names when using pandas and statsmodels)
  • 如何开启mysql计划事件
  • 检查数组的总和是否大于最大数,反之亦然javascript(checking if sum of array is greater than max number and vice versa javascript)
  • 使用OpenGL ES绘制轮廓(Drawing Outline with OpenGL ES)
  • java日历格式(java Calendar format)
  • Python PANDAS:将pandas / numpy转换为dask数据框/数组(Python PANDAS: Converting from pandas/numpy to dask dataframe/array)
  • 如何搜索附加在elasticsearch索引中的文档的内容(How to search a content of a document attached in elasticsearch index)
  • LinQ to Entities:做相反的查询(LinQ to Entities: Doing the opposite query)
  • 从ExtJs 4.1商店中删除记录时会触发哪些事件(Which events get fired when a record is removed from ExtJs 4.1 store)
  • 运行javascript后如何截取网页截图[关闭](How to take screenshot of a webpage after running javascript [closed])
  • 如何使用GlassFish打印完整的堆栈跟踪?(How can I print the full stack trace with GlassFish?)
  • 如何获取某个exe应用程序的出站HTTP请求?(how to get the outbound HTTP request of a certain exe application?)
  • 嗨,Android重叠背景片段和膨胀异常(Hi, Android overlapping background fragment and inflate exception)
  • Assimp详细说明typedef(Assimp elaborated type refers to typedef)
  • 初始化继承类中不同对象的列表(initialize list of different objects in inherited class)
  • 使用jquery ajax在gridview行中保存星级评分(Save star rating in a gridview row using jquery ajax)
  • Geoxml3 groundOverlay zIndex(Geoxml3 groundOverlay zIndex)