我正在尝试从SVN存储库检出代码,在提供凭据和存储库地址后,它无法提供以下错误.
该操作无法完成.(NSURLErrorDomain错误-1012.)
在控制台下面:
IDESourceControlAuthentication:无法从钥匙串中删除密码:错误域= DVTSecErrorDomain代码= -25300"在钥匙串中找不到指定的项目." UserInfo = 0x7fe7f5320860 {NSLocalizedDescription =在钥匙串中找不到指定的项目.}
请注意,它在Xcode 4.6上工作正常,并在更新到Xcode 5后开始给我错误.
我已经在我的一个应用程序中使用linkedin-sdk实现了LinkedIn登录功能,该应用程序运行良好。从最近几天开始,我无法继续进行错误提示
未设置访问令牌
以前不需要。
随着版本2.0的更新,访问令牌已成为强制性的,开发人员帐户中缺少详细信息。
我以这种方式实现了相同的方法:
private static final String host = "api.linkedin.com";
private static final String url = "https://" + host + "/v1/people/~:(first-name,last-name,email-address,formatted-name,phone-numbers,public-profile-url,picture-url,picture-urls::(original))";
LISessionManager.getInstance(getContext())
.init(getActivity(), buildScope(), new AuthListener() {
@Override
public void onAuthSuccess() {
APIHelper apiHelper = APIHelper.getInstance(getContext());
apiHelper.getRequest(getContext(), url, new ApiListener() {
@Override
public void onApiSuccess(ApiResponse apiResponse) {
try {
//edt_linkedInURL.setText(apiResponse.getResponseDataAsJson().get("publicProfileUrl").toString());
Log.e("Response", apiResponse.getResponseDataAsJson().toString());
setLinkedInData(apiResponse.getResponseDataAsJson());
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onApiError(LIApiError LIApiError) {
Toast.makeText(getContext(), "Profile failed " + LIApiError.toString(), Toast.LENGTH_LONG).show();
}
});
/* Toast.makeText(getActivity(), …Run Code Online (Sandbox Code Playgroud) 我知道很多次都会问这个问题,而且我也正在实施相同的基础来追逐uibutton的标题.
让我先解释一下我的问题.我有一个名为btnType的uibutton,点击一个选择器弹出的内容,选择一个值后,我点击完成按钮隐藏选择器,同时我用代码更改uibutton的标题
[btnType setTitle:btnTitle forState:UIControlEventTouchUpInside];
[btnType setTitleColor:[UIColor redColor] forState:UIControlEventAllEvents];
Run Code Online (Sandbox Code Playgroud)
但随着我的surpriaze,它没有改变,应用程序崩溃与信号EXC_BAD_ACCESS.我没有得到我犯错的地方.我已经在viewdidLoad为btnType分配了内存.我也在使用
-(IBAction)pressAddType
{
toolBar.hidden = FALSE;
dateTypePicker.hidden = FALSE;
}
Run Code Online (Sandbox Code Playgroud)
按下按钮打开拣货员的事件.另外我想提一下,我已经通过事件TouchUpInside为了与pressAddType建立了IB连接.
任何猜测?如果你能帮助我,我将不胜感激.谢谢.
更新:
@interface AddSettingPage : UIViewController<UITextFieldDelegate>
{
IBOutlet UIButton *btnType;
NSString *btnTitle;
}
@property (nonatomic, retain) IBOutlet UIButton *btnType;
-(IBAction)pressAddType;//:(id)sender;
Run Code Online (Sandbox Code Playgroud)
也
@synthesize btnType,btnTitle;
Run Code Online (Sandbox Code Playgroud) 我现在正在开发一个应用程序,我需要找出用户的心跳率.我发现有很多应用程序都在运行.但是无法找到支持相同的私有或公共API.
有没有可用的框架,对它们有帮助?另外,我想知道UIAccelerometer类是否对同样有用,什么可以达到相同的准确度?
如何使用以下功能实现相同的功能:将手指放在iPhone相机上或将麦克风放在下巴或手腕上或其他方式?
有没有办法检查血液循环变化广告找到心跳使用相同或UIAccelerometer?任何API或一些代码?谢谢.
我试图通过Facebook使用facebook iOS SDK发送应用程序请求,我使用以下代码:
NSString *message = [[NSString alloc] initWithFormat:@"blah blah blah"];
NSString *data = [[NSString alloc] initWithFormat:@"blah blah blah"];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:message, @"message", data, @"data", nil];
[_facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/apprequests",userID] andParams:params andHttpMethod:@"POST" andDelegate:self];
[message release];
[data release];
Run Code Online (Sandbox Code Playgroud)
这给了我以下错误:
Error: Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0x788c5b0 {error=<CFBasicHash 0x788c080 [0x1bf53e0]>{type = mutable dict, count = 2,
entries =>
2 : <CFString 0x788b560 [0x1bf53e0]>{contents = "type"} = <CFString 0x788c3f0 [0x1bf53e0]>{contents = "OAuthException"}
3 : <CFString 0x788c560 …Run Code Online (Sandbox Code Playgroud) 我正在开发一个应用程序,我在纵向模式下捕获图像,然后移动到另一个带有图像数据的类,并在UIScrollView上的UIImageView中显示该图像.
现在,如果我正在使用图像表单库,它工作正常,但如果我必须捕获图像,它将以横向模式显示数据.下面是我的两个类的代码.:
第1类:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSData *imgData = UIImagePNGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"]);
[picker dismissModalViewControllerAnimated:YES];
image = [[UIImage alloc] initWithData:imgData];
CGImageRef imgRefCrop = image.CGImage;
UIImage *photo = [UIImage imageWithCGImage:imgRefCrop];
PhotoCropperPage *photoCropper = [[PhotoCropperPage alloc]
initWithPhoto:photo
delegate:self
uiMode:PCPUIModePresentedAsModalViewController
showsInfoButton:YES];
[photoCropper setMinZoomScale:0.3f];
[photoCropper setMaxZoomScale:4.0f];
[self.navigationController pushViewController:photoCropper animated:YES];
}
Run Code Online (Sandbox Code Playgroud)
第2类:
- (void) loadPhoto
{
if (self.photo == nil) {
return;
}
CGFloat w = self.photo.size.width;
CGFloat h = self.photo.size.height;
CGRect imageViewFrame = CGRectMake(0.0f, 0.0f, roundf(w / 2.0f), roundf(h / 2.0f));
self.scrollView.contentSize = …Run Code Online (Sandbox Code Playgroud) 一旦pdf文件加载到ipad中,有没有办法确定页面总数?我正在使用CATiledLayer方法来加载pdf文件.
感谢您.
我
viewDidLoad(之前的tableView)被调用didSelectRowAtIndexPath(当前tableView).
我使用'singleton'来保持我的模型,到目前为止,它一直运作良好.我试图通过设置变量in 将当前表中选择的行传递didSelectRowAtIndexPath到目标tableview(它们通过故事板中的segue链接)didSelectRowAtIndexPath.
但是,在我可以设置行号之前调用viewDidLoad目标tableview.didSelectRowAtIndexPath稍后调用,但到那时我已经为目标表设置了我的数据(错误地).
objective-c uitableview viewdidload didselectrowatindexpath ios
我有一个数组,我从数据库中获取某些特定值的数据,因此该特定值不存在的键,它是在数组中获取空值.
现在,我的问题是如何消除数组中的空值?我试图将nsarray值提取到nsstring然后再提取到另一个数组,但是它不是获取整个数组,而是获取最后一个索引值.
请帮帮我.谢谢.
我附上代码以供进一步参考:
NSString *url = [NSString stringWithFormat:@"webservice from where i m fetching data"];
NSLog(url);
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
[request setHTTPMethod: @"POST"];
NSData *returnData = [ NSURLConnection sendSynchronousRequest:request returningResponse: nil error: nil ];
NSString *returnString = [[NSString alloc] initWithData:returnData encoding: NSUTF8StringEncoding];
dataArray=[[returnString JSONValue] retain];
[self setAlldetails:dataArray];
nsarray *InteName = [alldetails valueForKey:@"IntelligenceName"];
Run Code Online (Sandbox Code Playgroud)
所以数组获取数组InteName的值,如下所示:
(
"00:00:00",
"00:00:00",
"17:15:00",
"17:15:00",
"17:15:00",
"17:15:00",
"00:00:00",
"00:00:00",
"17:15:00",
"17:15:00",
"17:15:00",
"17:15:00",
"<null>",
"<null>",
"<null>",
"<null>",
"<null>",
"<null>",
"<null>",
"<null>",
"<null>"
)
Run Code Online (Sandbox Code Playgroud)
所以现在,我想删除值null的出现.
任何猜测?
我有UINavigationController基于应用程序,从本地数据库加载包含来自资源的图像的数据.
应用程序运行平稳ios 6,但在升级我的设备后ios 7.0.3,我发现在运行应用程序一段时间后(比如说2-3分钟)它停止显示导航效果并且页面导航而没有任何动画.
我也检查了记忆问题,但是徒劳无功.
码:
Run Code Online (Sandbox Code Playgroud)ABCController *viewController = [[ABCController alloc]initWithNibName:@"SelectRewardController" bundle:nil]; [self.navigationController pushViewController:viewController animated:YES];
正如我所提到的,它在iOS 6中运行顺畅,但导航效果已停止,下一个视图控制器在iOS7中没有任何动画效果.
我认为标题本身就说我想做什么?
斯蒂尔,让我澄清一下.我现在正在开发一个应用程序,我有两个日期格式如下:
"YYYY:MM:DD HH:MM:SS"
使用我需要以格式计算两个日期之间的差异:
HH:MM:SS
我在维基搜索过,也试过我的运气但是徒劳无功.有人可以帮帮我吗?
提前致谢.
我是 iphone 技术的新手,现在我正在使用一个需要实现推送通知的应用程序。
我按照链接:
http://mobiforge.com/developing/story/programming-apple-push-notification-services#comment-7850
另外,使用了以下代码:
NSLog(@"Registering for push notifications...");
[[UIApplication sharedApplication]
registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound)];
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSString *str = [NSString stringWithFormat:@"Device Token=%@",deviceToken];
NSLog(str);
}
- (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err
{
NSString *str = [NSString stringWithFormat: @"Error: %@", err];
NSLog(str);
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
for (id key in userInfo)
{
NSLog(@"key: %@, value: %@", key, [userInfo objectForKey:key]);
}
}
Run Code Online (Sandbox Code Playgroud)
事情是,当我运行程序时,我应该根据代码在调试器窗口中获取设备令牌,而不是我收到如下错误:
" 注册错误。错误:Error Domain=NSCocoaErrorDomain Code=3010 "模拟器不支持远程通知" UserInfo=0x6e055a0 {NSLocalizedDescription=模拟器不支持远程通知} "
我应该如何解决这个问题?
请帮帮我。 …
push-notification apple-push-notifications ios ios-simulator
假设我有一个大小为(394,129,328,9)的UIProgressBar,我增加了高度
CGAffineTransform transform = CGAffineTransformMakeScale(1.0f, 3.0f);
PgView.transform = transform;
Run Code Online (Sandbox Code Playgroud)
我需要实现的是:如果我有5分钟的时间,progressView应填充一定数量,并在5分钟结束时完全填充.同样1分30分钟.
我这样实现:
-(void)viewWillAppear:(BOOL)animated
{
CGAffineTransform transform = CGAffineTransformMakeScale(1.0f, 3.0f);
PgView.transform = transform;
recievedData = 0.01;
xpectedTotalSize = 1.0;
PgView.progress = 0.0;
[self performSelectorOnMainThread:@selector(makeMyProgressBarMoving) withObject:nil waitUntilDone:NO];
}
- (void)makeMyProgressBarMoving
{
float actual = [PgView progress];
if (actual < 1)
{
PgView.progress = actual + ((float)recievedData/(float)xpectedTotalSize);
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(makeMyProgressBarMoving) userInfo:nil repeats:NO];
}
else{
}
}
Run Code Online (Sandbox Code Playgroud)
它有效.但是我想动态地实现进度和时间间隔?任何的想法??
提前致谢.
objective-c ×8
ios ×5
iphone ×4
android ×1
cocoa-touch ×1
facebook ×1
ios7 ×1
ipad ×1
linkedin ×1
linkedin-api ×1
nsarray ×1
nstimer ×1
oauth-2.0 ×1
pdf ×1
sdk ×1
svn ×1
uibutton ×1
uiimageview ×1
uitableview ×1
viewdidload ×1
xcode ×1
xcode5 ×1