小编Ami*_*tan的帖子

XAMPP Apache Webserver localhost无法在MAC OS上运行

我在MAC OS 10.6上安装XAMPP服务器它工作正常.经过很多天我检查了一下,但这次没有工作,localhost这次没有打开.

经过一些研发后我卸载后重新安装XAMPP服务器

当我重新安装后启动apache,让端口80运行另一个webserver然后我重新启动系统,然后apache启动正常,但是同一个本地主机不工作

然后我在我的系统首选项中检查Web共享,然后它已经被关闭...

请有人告诉我哪里错了?

apache xampp macos

47
推荐指数
9
解决办法
14万
查看次数

UIScrollView在iPhone/iPad上旋转时禁用滚动

我正在使用UIScrollView和其中的图像作为每页分页一个图像.我在旋转iPhone时遇到问题

当我旋转iPhone然后scrollViewDidScroll(滚动视图委托方法)正在调用.因此,我的分页受到干扰,页码也会发生变化.

解决办法是什么?

iphone cocoa-touch uiscrollview uikit

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

Facebook图形API:音频共享

我可以使用facebook图形API分享音频吗?

  • 我可以直接在Facebook服务器上上传音频吗?
  • 我可以在Facebook上分享音频链接,它会在Facebook上显示嵌入式播放器吗?

我试过这个解决方案ios Facebook Graph API - 发布音频文件,但它没有按预期工作

我试过是共享的音频链接http://bit.ly/Ok4ZX6但显示它像一个正常的链接不与嵌入式播放器的Facebook http://i.stack.imgur.com/Ld67c.png

编辑

我使用的代码:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:4];
[params setObject:text forKey:@"message"];
[params setObject:title forKey:@"name"];
[params setObject:fileUrl forKey:@"source"];
[facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
Run Code Online (Sandbox Code Playgroud)

也使用此代码:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:4];
NSString *attachment = [NSString stringWithFormat:@"{'media': [{'type': 'mp3', 'src': '%@', 'title': '%@'}], 'messgae': 'Messgae Messgae Messgae', 'name': 'Name Name Name', 'href': '%@'}",amazon_link, title, link];
[params setObject:attachment forKey:@"attachment"];
[params setObject:text forKey:@"message"];
[params setObject:@"stream.publish" forKey:@"method"];
[facebook requestWithParams:params andDelegate:self];
Run Code Online (Sandbox Code Playgroud)

objective-c facebook-graph-api ios facebook-ios-sdk

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

Android LogCat不适用于模拟器

我是Android和java编程的新手.
LogCat对我的一个模拟器很好.
但同时它不适用于另一个模拟器.

任何机构都可以告诉我任何特定的设置.

编辑
@all DDMS截图,我正在使用MAC操作系统 在此输入图像描述

@Shlublu
它与API Level 8和Build In WVGA800
一起工作正常,但
有时无法使用HVGA 也无法使用WVGA800

阿米特巴图

eclipse android android-emulator

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

getFollowers时出现错误403:Twitter Iphone MGTwitterEngine

我正在使用Twitter-OAuth-iPhone https://github.com/bengottlieb/Twitter-OAuth-iPhone
我正在调用[twitterObj getFollowersIncludingCurrentStatus:NO]来获取我的好友列表.但是从最近两天
它给了我403错误.

-- Twitter Request FD751461-39C4-4EAB-A0F7-D1ED262B19EA failed with
error: Error Domain=HTTP Code=403 "The operation couldn’t be
completed. (HTTP error 403.)"
Run Code Online (Sandbox Code Playgroud)

由于twitter api wiki 403将超过更新和DM的限制

但是这里的getFollowersIncludingCurrentStatus为什么发生这个错误甚至列表不会在第二天发出相同的403错误.

谢谢
Amit Battan

twitter cocoa-touch iphone-sdk-3.0

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

推送通知:didFailToRegister和didRegister委托都没有调用

我正在创建一个支持推送通知的应用程序
我正在执行所有步骤.

它在模拟器上给出错误

Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo=0x5813d20 {NSLocalizedDescription=remote notifications are not supported in the simulator}
Run Code Online (Sandbox Code Playgroud)

但是在设备上它没有调用委托方法

didFailToRegisterForRemoteNotificationsWithError  
didRegisterForRemoteNotificationsWithDeviceToken  
Run Code Online (Sandbox Code Playgroud)

我的代码:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];

    NSLog(@"application didFinishLaunchingWithOptions");
    // Override point for customization after application launch.

    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
}

-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
    NSLog(@"My Token is %@",deviceToken);
}

-(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{
    NSLog(@"Failed to get token, …
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch objective-c apple-push-notifications ios

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

setAccessToken时出现twitpic API GSTwitPicEngine错误

我尝试使用GSTwitPicEngine类https://github.com/Gurpartap/GSTwitPicEngine在twitter上分享图片
但是它给出错误

因为我们必须设置[twitpicEngine setAccessToken:token];
我是否正确,我使用_accessTokenSA_OAuthTwitterEngine作为标记

_accessToken在课堂上是私人的SA_OAuthTwitterEngine,我把它设置为公开的

@property (nonatomic, readonly) OAToken *accessToken;
@synthesize accessToken = _accessToken;
Run Code Online (Sandbox Code Playgroud)

然后在行动

twitPicEngine = [GSTwitPicEngine twitpicEngineWithDelegate:self];
[twitPicEngine setAccessToken:twitterObj.accessToken];
[twitPicEngine uploadPicture:[shareDict objectForKey:@"image"] withMessage:[shareDict objectForKey:@"image_msg"]];
Run Code Online (Sandbox Code Playgroud)

但是,当setAccessToken与日志一起时,应用程序崩溃

-[OAToken parameters]: unrecognized selector sent to instance 0x6327e30
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[OAToken parameters]: unrecognized selector sent to instance 0x6327e30'
Run Code Online (Sandbox Code Playgroud)

如果你能找到任何错误,请帮忙

阿米特巴图

api cocoa-touch twitpic ios4 twitter-oauth

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

应用程序崩溃UIButton点击:iphone

我有一个View base iphone应用程序
我添加了一个NSObject类AddNewContact并在IB中获取它的对象

AddNewContact.h

#import <Foundation/Foundation.h>

@interface AddNewContact : NSObject {
}
-(IBAction)abc:(id)sender;
@end
Run Code Online (Sandbox Code Playgroud)

AddNewContact.m

#import "AddNewContact.h"

@implementation AddNewContact

-(IBAction)abc:(id)sender{
    NSLog(@"this is test");
}
@end
Run Code Online (Sandbox Code Playgroud)

我将UIButton操作绑定到abc:单击按钮应用程序崩溃,甚至NSLog也没有记录,
但如果我将按钮操作绑定到其他类函数,那么它工作正常

崩溃日志

2011-06-08 15:40:30.368 myApp[5466:207] -[NSCFString abc:]: unrecognized selector sent to instance 0x6b7b1c0
2011-06-08 15:40:30.416 myApp[5466:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString abc:]: unrecognized selector sent to instance 0x6b7b1c0'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x02ad9b99 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x02c2940e objc_exception_throw + …
Run Code Online (Sandbox Code Playgroud)

xcode cocoa-touch objective-c iphone-sdk-3.0

0
推荐指数
1
解决办法
2314
查看次数

按钮上的iOS6 UIViewControllerHierarchyInconsistency单击

我在iOS 6 iPad中面临问题

  1. 单击按钮 - >使用UITable打开popover
  2. 在选择一行 - > modalviewcontroller打开.
  3. 解雇modalviewcontroller(它工作正常)
  4. 然后再次单击按钮,按钮单击时应用程序崩溃(第1步)

此问题仅适用于iOS 6.它在iOS 5,iOS 4.3中运行良好

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UITableView: 0xb847400; frame = (0 0; 185 104); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0xa469e50>; layer = <CALayer: 0xa469f00>; contentOffset: {0, 0}> is associated with <UIViewController: 0xa462f60>. Clear this association before associating this view with <UIViewController: …
Run Code Online (Sandbox Code Playgroud)

objective-c ipad ios-simulator ios6

0
推荐指数
1
解决办法
2381
查看次数