我有一个视图控制器CaptureDataVC
和一个自定义视图KeyboardView
.
KeyboardView
具有根据需要工作所需的所有init函数:
-(id)initWithCoder:(NSCoder *)aDecoder
和-(id)initWithFrame:(CGRect)frame
在CaptureDataVC
我的xib文件中,我有一个UIView
自定义类KeyboardView
.
视图渲染得很好.问题是我不能调用任何方法KeyboardView
(它编译并且我没有得到任何错误但是没有调用方法).
基本上我不能这样做:
CaptureDataVC.h
@property (nonatomic,retain) IBOutlet KeyboardView *keyboardView;
Run Code Online (Sandbox Code Playgroud)
CaptureDataVC.m
[self.keyboardView foo];
Run Code Online (Sandbox Code Playgroud)
KeyboardView.m
-(void) foo {
NSLog(@"Hello World!"); //Won't print anyting
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗 ?
编辑:
自定义类设置为蓝色视图
为什么 Windows 文档如此缺乏?似乎不可能找到此方法如何工作的示例StartPreviewToCustomSinkAsync
我想做的是从视频源获取预览图像(通过MediaCapture),但无法理解此方法是如何工作的(特别是第二个参数IMediaExtension应该是/做什么)。
你们有机会帮我解决这个问题吗?
当我为 Android 构建 React Native 应用程序时,出现以下错误(在 iOS 上没有问题)。
错误:清单合并失败并出现多个错误,请参阅日志
当我在发布模式下构建时,这会导致真正的问题(调试中的应用程序没有问题),因为它为我的发布构建生成以下清单文件:
AndroidManifest.xml(在app/src/release/中)
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myAppName"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission tools:node="remove" android:name="android.permission.SYSTEM_ALERT_WINDOW" />
</manifest>
Run Code Online (Sandbox Code Playgroud)
我知道有很多关于此的问题,但它们对我的情况并没有真正的帮助,因为如果我遵循这个答案(/sf/answers/2941653011/)中的内容并转到Merged Manfiest tab
我的AndroidManifest.xml
文件我没有看到任何错误:
以下是我的 manfiest 和 gradle 文件:
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.myApp">
<!-- Optional - Add the necessary permissions (Choose one of those) -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <!-- Approximate location - If you want to use promptLocation for letting OneSignal know the user location. -->
<!-- End optional permissions -->
<uses-permission android:name="android.permission.INTERNET" /> …
Run Code Online (Sandbox Code Playgroud) 我已经阅读了很多关于这个的帖子,但是无法让这个用于我的项目.
所以基本上我有一个包含twitter bootstrap(v3)的Symfony2项目.在开发模式下,每件事都运行正常但是当我在prod模式下尝试它时,我得到错误,说无法找到twitter引导字体:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/Symfony/css/fonts/glyphicons-halflings-regular.woff
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/Symfony/css/fonts/glyphicons-halflings-regular.ttf
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/Symfony/css/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular
Run Code Online (Sandbox Code Playgroud)
这是正常的原因我在Symfony中没有css /文件夹/
以下是项目的结构:
app/
src/
vendor/
web/
css/
compiled/
fonts/
js/
Run Code Online (Sandbox Code Playgroud)
树枝文件:
{% block stylesheets %}
{% stylesheets output="css/compiled/main.css" filter='cssrewrite'
'css/bootstrap.min.css'
'css/general.css'
'css/navigation.css'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets …
Run Code Online (Sandbox Code Playgroud) 用于签署可执行文件的标识不再有效.
请确认您的设备时钟已正确设置,并且您的签名证书未过期.(0xE8008018).
我已经尝试了几乎所有我在SO上找到的东西,但对我来说没有任何作用.
我不确定它什么时候开始发生,我认为这是在我尝试向我的应用添加共享扩展程序之后.
在添加共享扩展(并在Target> Capabilities中启用应用程序组)并通过Xcode下载后,我重新生成了配置文件.
为什么会发生这种情况的任何想法?
我在尝试将dexguard集成到我的android/gradle项目时遇到了一些麻烦.
我遇到以下错误apply plugin: 'dexguard'
:
Error:Unable to load class 'com.android.builder.SdkParser'
Run Code Online (Sandbox Code Playgroud)
编辑:
这是我的应用程序的gradle文件:
buildscript {
repositories {
flatDir { dirs '/usr/local/DexGuard5.5.32/lib' }
jcenter()
}
dependencies {
classpath ':dexguard:'
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'dexguard' //This, when uncommented produces the error
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile files('libs/commons-collections4-4.0.jar')
compile files('libs/commons-codec-1.10.jar')
compile files('libs/gson-2.3.1.jar')
compile files('libs/jaxb2-maven-plugin:2.1.jar')
compile project(':sdk')
compile project(':zxing-lib')
}
android {
signingConfigs {
release {
//my signing …
Run Code Online (Sandbox Code Playgroud) 我正在开发一个使用 OneSignal 集成推送通知的 iOS 应用程序。我遵循了 iOS SDK 设置指南,一切顺利,但由于我进行了最新的 xcode 更新和 macos 更新,我无法构建要发布的应用程序或仅在物理设备上构建应用程序。
我收到有关对 OneSignal 扩展进行代码签名的以下错误:
仅供参考:主要目标的捆绑包标识符是com.example.ios.app
CodeSign /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex
cd /Users/pathToProject
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: Me (##########)"
Provisioning Profile: "iOS Team Provisioning Profile: com.example.ios.app.OneSignalNotificationServiceExtension"
(######-####-####-####-######)
/usr/bin/codesign --force --sign E7160941E1D4E45D870F30CB31F3EC30BFB0ABBA --entitlements /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/myApp.build/Release-iphoneos/OneSignalNotificationServiceExtension.build/OneSignalNotificationServiceExtension.appex.xcent --timestamp=none /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex
/Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
我做了一些研究,但没有发现任何有帮助的东西。
我在 AWS EC2 服务器上有一个 nodejs/express api,带有每 3 个月由 Let's encrypt 生成的 ssl 证书。自动续订未开启,我们在尝试续订之前让它过期,但在续订后我们收到一条错误消息:
无法验证第一个证书
或者
UNABLE_TO_VERIFY_LEAF_SIGNATURE
取决于我们测试的内容。
我们使用Certbot
以下命令(而不是$ certbot renew
)进行更新:
$ sudo certbot certonly --dns-route53 -d *.example.com -d example.com --server https://acme-v02.api.letsencrypt.org/directory
Run Code Online (Sandbox Code Playgroud)
证书按预期生成,有效期为 3 个月后。
对发生的事情有什么想法吗?我已经尝试了在 SO 和其他地方可以找到的大部分内容,但没有任何效果。
PS 服务器和我相处得不太好:/(我做移动应用程序开发)所以假设我在回复时什么都不知道:D
我在为我的视图的 layoutConstraints 之一设置动画时遇到了一些困难:
UIView.animate(withDuration: 1, delay: 0, options: UIViewAnimationOptions.curveEaseInOut, animations: {
self.topLayoutConstraint?.constant = self.currentYPosition
self.layoutIfNeeded()
}, completion: nil)
Run Code Online (Sandbox Code Playgroud)
无论我使用什么持续时间或延迟,动画都会立即完成(我的视图从以前的位置跳转到新的位置)。
我已经检查了所有值,它们是正确的。我还检查过并调用了动画和完成。
有任何想法吗 ?
编辑:
@objc private func viewDragged(_ recognizer: UIPanGestureRecognizer) {
let location = recognizer.location(in: self.superview)
switch recognizer.state {
case .ended:
if (recognizer.direction == .Down) { // Collapsing the slide panel
currentYPosition = parentViewHeight - minimumVisibleHeight - statusBarHeight - navBarHeight
}
else if (recognizer.direction == .Up) { // Expanding the slide panel
// Substracting `minimumVisibleHeight` so that the dragable part is …
Run Code Online (Sandbox Code Playgroud) 我在使用symfony 2.3时遇到了一些麻烦,我希望你能帮助我.
我真的不知道我做错了什么,但突然间我得到了这些错误,现在我无法摆脱它们.
错误1:
InvalidArgumentException: [WARNING 1549] failed to load external entity "file:///C:/wamp/www/Symfony/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd" (in n/a - line 0, column 0)
[WARNING 3084] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'file:///C:/wamp/www/Symfony/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd'. Skipping the import. (in in_memory_buffer - line 8, column 0)
[ERROR 1845] Element '{http://symfony.com/schema/dic/services}container': No matching global declaration available for the validation root. (in file:///C:/wamp/www/Symfony/web/ - line 5, column 0)
Run Code Online (Sandbox Code Playgroud)
误差2:
InvalidArgumentException: Unable to parse file "C:\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\DependencyInjection/../Resources/config\web.xml".
Run Code Online (Sandbox Code Playgroud)
我试图删除我认为导致这些错误的东西(我也尝试清理缓存),但没有一个工作.
我猜我在twig或xlf文件中一定有问题,因为这些错误出现在我修改了那些文件之后,却无法找出我在那些文件中做错了什么(对我来说,我所做的一切都是看起来很好)
如果你们需要它们我可以发布文件.
编辑:
树枝文件:
{% extends '::base.html.twig' %}
{% block …
Run Code Online (Sandbox Code Playgroud) 我在使用基本的nodejs和express程序时遇到了一些麻烦.
问题是当我使用npm start
哪个应该运行节点.\ bin\www我得到这些错误:
C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api>npm start
cdc-api@0.0.0 start C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api
node .\bin\www
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1042:14)
at listen (net.js:1064:10)
at Server.listen (net.js:1138:5)
at Function.app.listen (C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api\node_mo
dules\express\lib\application.js:556:24)
at Object.<anonymous> (C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api\bin\www:
7:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
npm ERR! cdc-api@0.0.0 start: `node .\bin\www`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the cdc-api@0.0.0 start script.
npm ERR! This …
Run Code Online (Sandbox Code Playgroud) ios ×4
android ×2
node.js ×2
symfony ×2
xcode ×2
.net ×1
amazon-ec2 ×1
assetic ×1
c# ×1
certbot ×1
dexguard ×1
express ×1
gradle ×1
lets-encrypt ×1
objective-c ×1
onesignal ×1
php ×1
proguard ×1
react-native ×1
swift ×1
symfony-2.3 ×1
xcode7 ×1