小编avi*_*elk的帖子

未知属性android:elevation

我正在尝试遵循一个教程,假设如何添加一个浮动按钮,在教程中它说要将属性添加android:elevation到按钮xml,如下所示:

<ImageButton
    android:layout_width="30dp"
    android:layout_height="30dp"
    android:id="@+id/editButton"
    android:layout_gravity="center|right"
    android:clickable="false"
    android:background="@drawable/edit_grey"
    android:layout_marginRight="1dp"
    android:elevation="@dimen/elevation_low"/>
Run Code Online (Sandbox Code Playgroud)

但它不认识那个属性......我相信它与我的项目目标或sdk有关...有人可以帮助我吗?

android android-xml android-button

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

使用背景图片和贴纸向 Instagram 分享故事 - IOS Swift

我正在尝试通过我的 ios 应用程序上的 URL 方案分享带有背景图像和贴纸图像的故事,我正在使用附加的代码,但它不起作用。当我尝试仅分享背景图像或贴纸时,它确实有效。但是,当我尝试共享背景图像和其顶部的贴纸时,它不起作用。

有任何想法吗?

func shareToInstagram(deepLinkString : String){
        let url = URL(string: "instagram-stories://share")!
        if UIApplication.shared.canOpenURL(url){

            let backgroundData = UIImageJPEGRepresentation(UIImage(named: "shop_placeholder")!, 1.0)!
            let creditCardImage = UIImage(named: "share_instagram")!
            let stickerData = UIImagePNGRepresentation(creditCardImage)!
            let pasteBoardItems = [
                                    ["com.instagram.sharedSticker.backgroundImage" : backgroundData],
                                    ["com.instagram.sharedSticker.stickerImage" : stickerData],
                                  ]

            if #available(iOS 10.0, *) {

                UIPasteboard.general.setItems(pasteBoardItems, options: [.expirationDate: Date().addingTimeInterval(60 * 5)])
            } else {
                UIPasteboard.general.items = pasteBoardItems
            }
            UIApplication.shared.openURL(url)
        }
Run Code Online (Sandbox Code Playgroud)

share url-scheme ios instagram swift

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

从IOS上的Instagram相机页面中的选项卡打开viewcontroller

我想要的是简单,IOS上的Instagram中间选项卡打开应用程序的相机界面,但不像其他选项卡,但作为一个独立的视图控制器,当你按下取消它回到你最后一个标签.

有任何想法吗??

camera uiviewcontroller ios instagram

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

IOS 上的 Firebase TestLab - .xctestrun 文件未指定任何测试目标

我正在尝试使用本指南在 iOS 上使用 firebase TestLab:

https://firebase.google.com/docs/test-lab/ios/firebase-console#build_xctests_for_your_app

但是在我上传包含 xctestrun 文件的 zip 文件后,我收到以下错误:

Upload invalid: the .xctestrun file didn't specify any test targets.
Run Code Online (Sandbox Code Playgroud)

我的应用程序中有两个目标,一个测试目标和一个 UI 测试目标,在这两个测试目标上,我将要测试的目标设置为主机应用程序。

有任何想法吗?

unit-testing ios firebase firebase-test-lab

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

在didFinishLaunchingWithOptions之后几秒钟,应用程序openURL被调用

我的应用程序具有深层链接功能,在一种情况下也可以正常工作。根据打开应用程序的网址,我有3个不同的入职页面。因此,启动应用程序时,我需要知道是什么链接(如果有)打开了应用程序,然后显示正确的入职页面。问题是我需要知道方法中显示的屏幕:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
Run Code Online (Sandbox Code Playgroud)

但我只能知道深层链接是否在

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation 
Run Code Online (Sandbox Code Playgroud)

在做完之后的5秒didFinishLaunchingWithOptions被调用(我计算了秒数)。所以我有5秒钟的时间才看到一个错误的入职页面,直到openURL调用了l (如果将被调用)。

所以我的问题是:有没有办法知道应用是在URL之前还是期间从URL启动的didFinishLaunchingWithOptions

顺便说一句launchOptionsdidFinishLaunchingWithOptions当应用程序从深层链接打开时为零

deep-linking uiapplicationdelegate ios

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