我想找到近似形状的总数.
在图像中,有6个没有近似多边形.我试过以下方法
for (NSInteger i = 0; i < [arrLinesInfo count]; i++) {
NSDictionary *dictLineInfo = [arrLinesInfo objectAtIndex:i];
startPoint = CGPointMake([[dictLineInfo valueForKey:@"line_start_point_x"] doubleValue], [[dictLineInfo valueForKey:@"line_start_point_y"] doubleValue]);
endPoint = CGPointMake([[dictLineInfo valueForKey:@"line_end_point_x"] doubleValue], [[dictLineInfo valueForKey:@"line_end_point_y"] doubleValue]);
[self isCircularRoute:startPoint withEndPoint:endPoint];
}
-(void) isCircularRoute:(CGPoint) lineStartPoint withEndPoint:(CGPoint) lineEndPoint
{
NSPredicate *pre= [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"
(self.line_end_point_x == '%f' && self.line_end_point_y == '%f') OR
(self.line_start_point_x == '%f' && self.line_start_point_y == '%f') OR
(self.line_end_point_x == '%f' && self.line_end_point_y == '%f') OR
(self.line_start_point_x == '%f' && self.line_start_point_y == '%f')", …Run Code Online (Sandbox Code Playgroud) 我需要拉伸图像右侧和左侧中心半圆保持原样。还需要在中心半圆
我试过切片概念,也试过下面的代码
UIImage *image = self.imgBGBottom.image;
CGFloat capWidth = floorf(image.size.width / 2) - 50;
CGFloat capHeight = 0;
UIImage *capImage = [image resizableImageWithCapInsets:
UIEdgeInsetsMake(capHeight, capWidth, capHeight, capWidth)];
[self.imgBGBottom setImage:capImage];
Run Code Online (Sandbox Code Playgroud)
但它对我不起作用
请帮我。提前致谢。
我已经做了大量的研发工作来过私人生日facebook,但却无法过私人生日.
我已经在代码中给了生日许可.还试图从用户的帐户删除应用程序,但没有运气.
if((FBSDKAccessToken.currentAccessToken()) != nil){
FBSDKGraphRequest(graphPath: "me", parameters: ["fields": "id, birthday, name, first_name, last_name, picture.type(large), email, gender"]).startWithCompletionHandler({ (connection, result, error) -> Void in
if (error == nil){
Print("Success")
}else{
Print("Failed")
}
})
}else{
Print("Device token is Nil")
}
Run Code Online (Sandbox Code Playgroud)
请帮帮我,我的错误在哪里.