我正在使用iOS内置框架进行连接.在询问"publish_stream"权限后,FB返回错误:
Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The app must ask for a basic read permission at install time." UserInfo=0x145ad6a0 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The app must ask for a basic read permission at install time.}
这里发生了什么?显示两个用户权限弹出窗口的用户体验不太理想.
permissions authorization facebook-graph-api ios facebook-oauth
我正在使用respond_with,所有内容都正确连接,以正确获取数据.我想自定义的返回json,xml以及foobar格式在干燥的方式,但我无法弄清楚如何使用有限的做:only和:include.当数据很简单时,这些都很棒,但是对于复杂的发现,它们不符合我的要求.
可以说我有一个帖子哪个has_many图像
def show
  @post = Post.find params[:id]
  respond_with(@post)
end
我希望将图像包含在响应中,以便我可以这样做:
def show
  @post = Post.find params[:id]
  respond_with(@post, :include => :images)
end
但我真的不想发送整个图像对象,只是网址.除此之外,我真的希望能够做到这样的事情(伪代码):
def show
  @post = Post.find params[:id]
  respond_with(@post, :include => { :foo => @posts.each.really_cool_method } )
end
def index
  @post = Post.find params[:id]
  respond_with(@post, :include => { :foo => @post.really_cool_method } )
end
......但是一切都干了.在较旧的rails项目中,我使用XML构建器来自定义输出,但是在json,xml,html中复制它看起来不对.我不得不想象铁路专家在Rails 3中放了一些东西,我没有意识到这种行为.想法?
我正在创建一个NSView具有圆角的子类.此视图是一个容器,其他子视图将添加到其中.我试图获得圆角NSView以夹住所有子视图的角落,但我无法得到它.
- (void)drawRect:(NSRect)dirtyRect {
    NSRect rect = [self bounds];
    NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:self.radius yRadius:self.radius];
    [path addClip];
    [[NSColor redColor] set];
    NSRectFill(dirtyRect);
    [super drawRect:dirtyRect];     
}
红色就是例如.如果我在矩形中添加子视图,则角落不会被剪裁:

我怎样才能做到这一点?
在编译iPhone应用程序时,有一个"优化"架构(仅限armv7)与标准armv6/armv7架构的设置.
编译armv7架构有什么好处/后果?
我有一个项目,我已经工作了一段时间.它是标准的Xcode/Objective-C iPhone应用程序.我为我的设备和其他几个人创建了配置文件.现在我想添加一些人作为测试人员.
我是否需要下载并安装新的配置文件?
我是否需要更改Xcode中的设置?
做这一切最简单的方法是什么?
谢谢!
我知道如何设置和显示椭圆形状.我知道如何将渐变应用于此形状.我无法弄清楚我是如何得到一个椭圆形渐变来匹配形状.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="oval" >
    <gradient
        android:startColor="#66FFFFFF"
        android:endColor="#00FFFFFF"
        android:gradientRadius="100"
        android:type="radial" />
</shape>
如果你可以想象,这个渐变在中间有一个半透明的白色发光,然后在边缘渐渐变为alpha零.我需要让它以椭圆形状出现,而不仅仅是圆形渐变.我怎样才能做到这一点?
我知道这个主题有很多,但我无法获得任何代码.我正在运行iOS5并为iPad构建,我只是无法在导航栏的一侧获得两个按钮.
任何帮助将不胜感激,谢谢.
编辑:
我测试过的一些代码viewDidLoad,但它没有做任何事情.
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(save)];
    UIBarButtonItem *deleteButton = [[UIBarButtonItem alloc] initWithTitle:@"Delete" style:UIBarButtonItemStylePlain target:self action:@selector(delete)];
    self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:saveButton,deleteButton,nil];
我试图通过将图像效果应用到屏幕截图来在我的玻璃中使用iOS 7风格的玻璃效果MKMapView.Apple提供的这个UIImage类别是我用作基线的.此方法使用输入值对源图像进行去饱和处理,应用色调颜色并大量模糊:
[image applyBlurWithRadius:10.0
                 tintColor:[UIColor colorWithRed:229/255.0f green:246/255.0f blue:255/255.0f alpha:0.33] 
     saturationDeltaFactor:0.66
                 maskImage:nil];
这会产生我正在寻找的效果,但需要太长时间 - 在iPhone 4上渲染的时间.3和.5秒数之间.

我想使用优秀的,GPUImage因为我的初步尝试速度提高了大约5-10倍,但我似乎无法做到这一点.
GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithImage:image];
GPUImageSaturationFilter *saturationFilter = [[GPUImageSaturationFilter alloc] init];
saturationFilter.saturation = 0.33; // 1.0 - 0.66;
[stillImageSource addTarget:saturationFilter];
GPUImageMonochromeFilter *monochromeFilter = [[GPUImageMonochromeFilter alloc] init];
[monochromeFilter setColor:(GPUVector4){229/255.0f, 246/255.0f, 1.0f, 0.33f}];
[monochromeFilter setIntensity:0.2];
[saturationFilter addTarget:monochromeFilter];
GPUImageFastBlurFilter *blurFilter = [[GPUImageFastBlurFilter alloc] init];
blurFilter.blurSize = 2;
blurFilter.blurPasses = 3;
[monochromeFilter addTarget:blurFilter];
[saturationFilter prepareForImageCapture];
[monochromeFilter prepareForImageCapture]; …我的应用程序在从锁定屏幕变为活动状态时(在激活时锁定)或从其他任何东西变为活动状态时具有不同的行为.
在iOS 6及更低版本上,我可以检测到这一点
UIApplicationState state = [[UIApplication sharedApplication] applicationState];
if (UIApplicationStateInactive == state)
    // Coming from locked screen (iOS 6)
else
    // Coming from Springboard, another app, etc...
但是在iOS 7上,状态值UIApplicationStateBackground在两种情况下都是如此.这是预期的行为吗?如何正确检测应用程序现在是否从锁屏启动?
注册开发者,我已经在NDA解除之前在devforums上发布了这个,请看这里
cocoa-touch background multitasking uiapplicationdelegate ios
我希望让我的网站的读者从移动浏览器共享网址到他们的原生Facebook应用程序,而无需使用javascript,或让他们通过繁琐的网络流程登录.
在过去,这是使用fb://publish/profile/me?text=blahiOS和Android 的url方案完成的.单击时,此链接将打开本机应用程序并启动新的共享对话框.
然而,在2013年末/ 2014年初的某个时候,这种方法停止了工作.有没有更新的方法来使用静态URL在iOS和/或Android Intent上打开本机共享对话框?这里需要一个规范的答案,因为搜索SO会导致大量旧的,已弃用的死胡同.
ios ×5
android ×2
iphone ×2
adhoc ×1
armv6 ×1
armv7 ×1
background ×1
clipping ×1
cocoa ×1
cocoa-touch ×1
core-image ×1
dry ×1
facebook ×1
gpuimage ×1
gradient ×1
graphics ×1
mkmapview ×1
multitasking ×1
nsbezierpath ×1
nsview ×1
objective-c ×1
permissions ×1
provisioning ×1
respond-with ×1
response ×1
shape ×1
share ×1
url-scheme ×1