小编stk*_*stk的帖子

为什么WKWebView没有打开target ="_ blank"的链接?

WKWebView不打开任何target="_blank"在HTML <a href>-Tag中也称为"在新窗口中打开"属性的链接.

ios wkwebview

104
推荐指数
9
解决办法
7万
查看次数

在iOS7半透明导航栏中获得正确的颜色

如何在iOS 7中为我的半透明导航栏获得正确的颜色?导航栏只是将给定的颜色调整为更亮的颜色.改变颜色的亮度或饱和度也无法提供正确的结果.

谁有同样的麻烦?它似乎以某种方式工作,看着Facebook:他们有自己的颜色和半透明的导航栏.

编辑:只是为了说清楚:我需要条形图是半透明的,不透明(有一些阿尔法),不是坚实的!http://en.wikipedia.org/wiki/Transparency_and_translucency

编辑:现在发布到Apple BugReporter

colors uinavigationbar ios ios7

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

iOS 6轮换:supportedInterfaceOrientations不起作用?

我在iOS 6 SDK中遇到了这个问题:我有一些应该被允许轮换的视图(例如视频视图),而有些则不允许.现在我明白我必须检查应用程序的Info.plist中的所有方向,然后在每个ViewController中进行排序,应该发生什么.但它不起作用!应用程序始终旋转到Info.plist中给出的方向.

Info.plist的:

<key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
Run Code Online (Sandbox Code Playgroud)

任何不允许旋转的ViewController:

//deprecated
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait;
}
Run Code Online (Sandbox Code Playgroud)

观察:App旋转到横向和纵向.任何想法为什么或我做错了什么?

干杯,马克

编辑:我的最新调查结果还表明,如果您希望在应用程序中的某个位置进行旋转,必须激活项目设置或Info.plist中的所有四个旋转方向.替代方法是覆盖

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
Run Code Online (Sandbox Code Playgroud)

在你的AppDelegate中,它会覆盖Info.plist.不再可能只在Info.plist中设置Portrait,然后通过覆盖shouldAutorotateToInterfaceOrientation或supportedInterfaceOrientations在某些ViewController中进行旋转.

rotation screen-rotation ios ios6

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

Apple Watch的WatchKit中是否有ActivityIndi​​cator?

Apple Watch的WatchKit中是否有ActivityIndi​​cator(或类似的东西)?您如何向用户提供有关更持久的背景活动的反馈?

uiactivityindicatorview watchkit

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

Xcode 11:画布不显示

我正在尝试从Xcode 11运行新的Canvas功能,但是Canvas不会显示。我究竟做错了什么?

我刚刚创建了一个新的默认项目(单视图应用程序),对其进行了编译并激活了“编辑器>编辑器和画布”。我可以导航到项目中的每个文件,没有任何显示。

还需要做什么?

ios swift swiftui xcode11

30
推荐指数
8
解决办法
9751
查看次数

iOS 8/Xcode 6 Simulator不再使用HTTP代理

我的iOS 8模拟器不再使用我的代理设置了(我想用Charles调试).系统的其余部分.模拟器似乎有点直接上网.我错过了一些新设置吗?

警告:如果在Xcode 6(iOS 8)模拟器上使用Charles Proxy,这是不重复的.我首先尝试在模拟器上使用SSL.我的模拟器甚至没有开始使用代理.

查尔斯:

代理设置

系统:

连接 代理设置

proxy ios-simulator xcode6 ios8 charles-proxy

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

iOS:如何获取安装引用来源

我想知道用户如何使用什么来源(归因)安装应用程序.

对于Android,可以获得引用者的URL,但我还没有找到适合iOS的明显方法.有一些外部服务,例如AppsFlyer(http://support.appsflyer.com/entries/69796693-Accessing-AppsFlyer-Attribution-Conversion═-from-the-SDK-Deferred-Deep-linking-)让你这样做.

我注意到,从iOS 8开始,开发人员可以将发布商ID和广告系列ID添加到iTunes Connect Analytics的App Store URL(http://www.applift.com/blog/new-era-attribution-analytics.html).是否可以在应用内获取广告系列ID和发布商ID?我找不到任何API更改或资源.

任何帮助,将不胜感激.谢谢.

ios ios8

20
推荐指数
1
解决办法
9634
查看次数

largeHeap = true清单标签不起作用?

我正在开发一个非常耗费内存的应用程序,并希望使用largeHeap-Tag,它应该为应用程序提供更多内存.无论我在AndroidManifest.xml中将此标记设置为什么,它对我给出的实际内存没有任何影响.我正在读出这样的最大记忆:

Log.v("Utils","Max Mem in MB:"+(Runtime.getRuntime().maxMemory()/1024/1024));
Run Code Online (Sandbox Code Playgroud)

我的清单看起来很像这样:

<application android:label="@string/app_name" android:hardwareAccelerated="true" android:largeHeap="true" android:debuggable="true">

    <activity android:name=".EntryActivity" android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>
Run Code Online (Sandbox Code Playgroud)

我在模拟器中运行3.1,我上面的日志输出总是48MB.有人可以帮忙吗?

java android

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

未知的崩溃原因(附带CrashReport)SIGTRAP.AFNetworking?

我一直在AppStore中的应用程序中遇到这些崩溃.CrashReport总是如下所示:

Incident Identifier: 986486D7-F013-4102-B9E3-84F923223914
CrashReporter Key:   [TODO]
Hardware Model:      iPhone4,1
Process:         MyApp [57885]
Path:            /Users/USER/MyApp.app/MyApp
Identifier:      de.myapp.iphone
Version:         12475
Code Type:       ARM
Parent Process:  launchd [1]

Date/Time:       2012-12-20 15:48:53 +0000
OS Version:      iPhone OS 6.0.1 (10A523)
Report Version:  104

Exception Type:  SIGTRAP
Exception Codes: #0 at 0x3abd62be
Crashed Thread:  0

Thread 0 Crashed:
0   CoreFoundation                      0x363582be CFRelease + 18
1   WebCore                             0x383de395 WebCore::stopSharedTimer() + 33
2   WebCore                             0x38433515 WebCore::TimerBase::~TimerBase() + 45
3   WebCore                             0x3846003b WebCore::Document::~Document() + 2751
4   WebCore                             0x3845f56d …
Run Code Online (Sandbox Code Playgroud)

crash-reports ios plcrashreporter ios5 ios6

15
推荐指数
1
解决办法
2576
查看次数

从Property中省略/删除'strong'属性时发出警告?

阅读ProgrammingWithObjectiveC,我可以说:

没有必要明确指定强属性,因为它是默认属性.

如果我省略项目中属性的'strong'属性,

@property (nonatomic) NSString *string;
Run Code Online (Sandbox Code Playgroud)

它给了我一个警告:

未指定"assign","retain"或"copy"属性 - 假定为"assign"

又名.

-Wobjc属性,无属性

因此,编译器似乎在想我仍在进行手动引用计数,否则就不会有任何警告.

此外,在创建一个新的空项目时,如果没有"强"属性,它不会发出警告,因此它必须与当前项目设置有关,甚至可能是某些无法通过UI访问的标志.该项目相当陈旧(约2年),同时经历了几个迁移步骤(XCode 3> 4> 5,非ARC> ARC等).

我在项目设置中到处寻找,但某处似乎是一个缺少的勾选标记或其他东西.

有人遇到过同样的问题吗?

properties ios automatic-ref-counting xcode5

9
推荐指数
1
解决办法
1163
查看次数