我正在使用UIPinchGestureRecognizer视图,现在我需要知道是否执行了捏合或者在我的选择器方法中执行了扩大操作.一次1个中的任何一个.请给我一些想法来获得这个.谢谢.
我的项目中有一个NSString和一个webView(iPhone的Objective-C),我index.html在webView中调用,在里面我插入了我的脚本(javascript).
如何在我的脚本中将NSString作为var传递,反之亦然?
这是一个例子,但我不太了解它.
同时运行java map减少eclipse中的应用程序,并面临以下异常.我已经在我的构建路径中包含了commons-logging-1.2.jar文件,但仍然在下面.
我是hadoop的新手.请帮助我.
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at org.apache.hadoop.conf.Configuration$DeprecationDelta.<init>(Configuration.java:314)
at org.apache.hadoop.conf.Configuration$DeprecationDelta.<init>(Configuration.java:327)
at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:409)
at AverageNosClass.main(AverageNosClass.java:71)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 4 more
Run Code Online (Sandbox Code Playgroud) Facebook iOS SDK是否提供任何默认(Facebook)专辑Photo's picker UIImagePickerController?
我听说过这么长时间搜索它但找不到任何东西.
如果有人对此有任何想法,请告诉我.如果不是,那么我肯定需要自己做.
我正在开发一个应用程序(这不是一个音乐应用程序),但是,在某些时候,它可以播放UIWebView启用自动播放的(来自html 5文件)内的音频.
问题是,我的应用名称显示在iPhone"控制中心"的"音乐"部分中.当我点击我的应用名称时,它将打开我的应用程序.但是,我不希望这种行为.
我已经尝试设置[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = nil;内部AppDelegates,当应用程序转到后台或前景或甚至终止案例.但它仍然显示应用程序名称?任何线索?有什么我不想设置的东西吗?
哦,是的,这可能有助于某人知道确切的问题,在我正在播放音频的视图控制器中UIWebView,我已经编写了以下代码来处理我的iPhone音乐(或任何其他)应用程序中当前播放的歌曲.
- (void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
MPMusicPlayerController *mp = [MPMusicPlayerController systemMusicPlayer];
if(mp.playbackState == MPMoviePlaybackStatePlaying) {
isSystemMediaPlayerPlaying = YES;
}
}
- (void) viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if(isSystemMediaPlayerPlaying) {
MPMusicPlayerController *mp = [MPMusicPlayerController systemMusicPlayer];
[mp play];
isSystemMediaPlayerPlaying = NO;
}
}
Run Code Online (Sandbox Code Playgroud)
对于注释,isSystemMediaPlayerPlaying是一种BOOL类型.
截图:
PS而不是"你管",你可以考虑"我的应用名称".
刚刚将Xcode更新为4.3,现在我无法构建我的应用程序.我收到这个错误:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254
Run Code Online (Sandbox Code Playgroud)
还有其他人有这个问题吗?它可能只是一个编译设置,但我不知道在哪里看.
当然,错误包括整个堆栈转储,但为了简洁起见,我没有包括它.我希望有人知道"退出代码254"是什么.尝试搜索它但找不到任何东西.
这是整个输出:
CompileC /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.o iDB/SCheckBox.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Users/aaron/Dropbox/XCode Projects/iDB"
setenv LANG en_US.US-ASCII
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -Wno-conversion -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" …Run Code Online (Sandbox Code Playgroud) 我正在使用Xcode 4,当我运行我的应用程序时,第一个屏幕无法加载.它在模拟器和设备上失败.我已经搜索了答案,他们都说要确保我已经将文件所有者中的圈子拖到了正确的视图中.对不起,我不记得事情的名字,我是Xcode的新手.我把圆圈拖到正确的视图并尝试了很多东西,但没有一个能够工作.我能做错什么?
这是完整的错误:
2012-02-19 12:59:54.655 Ponyboard[271:207]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "PonyboardViewController" nib but the view outlet was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00f095a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0105d313 objc_exception_throw + 44
2 CoreFoundation 0x00ec1ef8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00ec1e6a +[NSException raise:format:] + 58
4 UIKit 0x0020d709 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x0020b134 -[UIViewController loadView] + 120
6 UIKit 0x0020b00e -[UIViewController view] …Run Code Online (Sandbox Code Playgroud) 我有一个UITextField只显示数值(0-9,., - ).当用户选择文本字段的内容时,出现具有"复制","粘贴"和"定义"的菜单.由于textfield只显示数值,我不希望出现"define"选项.如何禁用字典"定义"选项UITextField?
编辑:我已经解决了这个问题,并在下面发布了解决方案
我需要将支付宝支付网关集成到我的应用程序中,我已经潜入谷歌海,但不幸的是,我的需求没有鱼.
从某个地方,我找到了这个链接,https://globalprod.alipay.com/order/integrationGuide.htm,但是iOS应用程序没有集成步骤.
有没有人以前实现过这个?那里有任何文件吗?什么?
我收到了一些回复JSON,并且工作正常,但我需要检查一些null值,
我找到了不同的答案,但似乎还没有工作,
NSArray *productIdList = [packItemDictionary objectForKey:@"ProductIdList"];
Run Code Online (Sandbox Code Playgroud)
我试过了
if ( !productIdList.count ) //which breaks the app,
if ( productIdList == [NSNull null] ) // warning: comparison of distinct pointer types (NSArray and NSNull)
Run Code Online (Sandbox Code Playgroud)
那么发生了什么?如何修复此问题并null在我的阵列中检查?
谢谢!