小编BDG*_*pps的帖子

以太坊创世纪封锁私人网络

我想在私人网络上挖掘.

如何在边境以太坊中为私人网络创建一个创世块?

我已经看到:https://blog.ethereum.org/2015/07/27/final-steps/但这是为了获取公共Genesis块.

encryption cryptography blockchain ethereum

8
推荐指数
2
解决办法
2483
查看次数

寻找代码询问"请为此应用评分"

我正在寻找代码,询问用户是否要对应用程序进行评级,之后他们已经使用了X时间.我在一些大型游戏应用程序中看到了这一点.

cocoa-touch objective-c ios

7
推荐指数
2
解决办法
6223
查看次数

Dropbox SDK 401错误

我正在使用Dropbox SDK并将其设置为应用程序只能访问/ Apps/MyAPP文件夹.我正在测试它并在线删除该文件夹.现在,当我在应用程序而不是要求重新链接Dropbox时,它给我一个401错误.我不知道它为什么不显示视图.它在我删除文件夹之前工作(在线取消链接应用程序).先感谢您.

PageFlipper [66893:c07] [警告] DropboxSDK:向/ 1/metadata/sandbox发出错误请求 - 令牌无效.2012-08-23 03:10:12.920 PageFlipper [66893:c07]加载元数据时出错:错误Domain = dropbox.com Code = 401"操作无法完成.(dropbox.com错误401.)"UserInfo = 0x23263fe0 {path = /,error =令牌无效.}

-(IBAction)addDropBox:(id)sender{
    if (![[DBSession sharedSession] isLinked]) {
        [[DBSession sharedSession] linkFromController:[self parentViewController]];
    }
    [[self restClient] loadMetadata:@"/"];
    restClient = nil;
};
Run Code Online (Sandbox Code Playgroud)

iphone objective-c dropbox

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

NSAtributedString字体

如何在iPhone上设置NSAtributedString的字体.我在网上找到了如何为mac做这件事,但它不一样.当我试图将它转换到iOS平台时,它无法正常工作.我需要设置字体名称和字体大小.

 NSDictionary *attributes = [[NSDictionary alloc] initWithObjectsAndKeys:
                                [UIFont fontWithName:@"Helvetica" size:26], kCTFontAttributeName,
                                [UIColor blackColor], kCTForegroundColorAttributeName, nil];
Run Code Online (Sandbox Code Playgroud)

nsattributedstring ios

5
推荐指数
2
解决办法
7309
查看次数

DropboxSDK:无法链接

我一直在收集Dropbox错误,:[错误] DropboxSDK:无法链接; 应用程序未注册正确的URL方案.我相信我已经做好了一切.我在网上研究过,最常见的原因是info.plist,但我不认为我有这个错误.我犯了错误吗?

在此输入图像描述

在此输入图像描述 在此输入图像描述

objective-c dropbox ios

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

UICollectionView 水平滚动

我正在我的 iOS 应用程序中实现 UICollectionView。我拥有它,所以每个单元格都是屏幕的宽度,我希望拥有它,以便在水平滚动时它锁定到可见单元格并将其移动到屏幕的中心。我的下面的代码仅适用于第一个单元格。我不明白如何让它适用于用户可见的任何单元格。

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
    int index  = 0;
    for (TextCell * t in [_tabBarCollectionView visibleCells]) {
        if ((t.center.x>0)&&(t.center.x<[[UIScreen mainScreen]bounds].size.width)) {
            [_tabBarCollectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES];
            break;
        }
        index++;
    }

}
Run Code Online (Sandbox Code Playgroud)

ios uicollectionview uicollectionviewcell

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

iPhone石英绘图橡皮擦

我正在尝试使用擦除制作iPhone应用程序.我遇到了两个问题,如果你有任何一个解决方案,请回答这个问题.我想删除部分图像.

1)我目前只是清除矩形,但它有一个方形边缘.我希望它是圆的,我之前尝试过翻译,但这不起作用.我还需要它尽可能少地翻译/旋转以保持相同的性能.

2)另外我想知道是否还有其他擦除方法.当快速擦除时,它会擦掉1/2英寸.有没有办法抚摸一条路径并清除矩形或什么东西?对不起,如果这很难理解.

CGRect circleRect = CGRectMake([touch CGPointValue].x, [touch CGPointValue].y, 25, 25);
CGContextClearRect(currentContext,circleRect);
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

iphone drawing quartz-graphics ipad ios

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

NSMutableAttributedString - NSForegroundColorAttributeName

我试图设置我的数组中的所有范围的颜色,但我收到此错误.我不明白为什么.范围都是有效的.我甚至尝试手动插入一个范围来测试它.谢谢.

CGContextSetFillColorWithColor:无效的上下文0x0

NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:tv.text];

for (NSString * s in array) {
        [string addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSRangeFromString(s)];
}

CATextLayer *textlayer = [[CATextLayer alloc]init];
textlayer.frame = CGRectMake(0, 0, 320, 480);
[self.view.layer addSublayer:textlayer];
textlayer.string = @"aString"; //works
textlayer.string = string; //does not work
tv.text = @"";
Run Code Online (Sandbox Code Playgroud)

iphone objective-c ios4 ios ios5

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

预加载网站

我想要预加载一个网站.我只想在网站上加载一次.当它加载我想要每个页面预加载.我该怎么做?

http://frankadvertisingus.com/fa_website/home.html

html javascript jquery dreamweaver web

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

检测用户是否触摸了屏幕

如何检测用户是否在过去5秒内触摸了屏幕.如果他们没有,我希望它调用我的方法来隐藏导航栏.我找到了一些答案,但无法弄明白.

谢谢

.hhhh

   #import <UIKit/UIKit.h>
    #import "PageView.h"
    #import "SlideShowViewController.h"
    #import "PagesCollectionViewController.h"

    @interface PageFlipperAppDelegate : NSObject <UIApplicationDelegate> {}

    @property (nonatomic, retain) IBOutlet UIWindow *window;

    @property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
    @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
    @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;

    - (void)saveContext;
    - (NSURL *)applicationDocumentsDirectory;

    @end




    @protocol MyKindOfWindowDelegate;

    @interface MyKindOfWindow : UIWindow
    {

        NSTimer *tenthTimer;
        NSInteger tenthPast;
    }

    @property (nonatomic, assign) id <MyKindOfWindowDelegate> touchDelegate;

    -(void)startTimer;
    -(void)stopTimer;
    -(void)timerTick;

    @end

    @protocol MyKindOfWindowDelegate <NSObject>

    @required
    - (void) noTouchForFiveSeconds;
    @end
Run Code Online (Sandbox Code Playgroud)

.mmmm

    #import "PageFlipperAppDelegate.h" …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c ipad ios ios5

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