正如标题所说.要求是能够在将裁剪后的图像上传到服务器之前裁剪图像.所有工作都应该在客户端完成.我听说过在服务器上裁剪图像并完全保存的方法.
但是因为我使用Parse.com服务.服务器端不支持图像处理,因此我需要在本地处理它并将完成的图像直接上传到Parse.com服务.
示例代码非常有用.谢谢.
我正在使用Parse 1.7.1(最新版本),Swift运行xcode 6.3项目.我在我的构建中提出了这个问题.我的自动完成和打字很慢,我觉得它可能有关系.我正在测试项目,它只在Bolts模块在项目中时才会发生(这是Parse所需的).
摘要
当用户点击该RecyclerView项目时,我想根据存储在BaaS [Sashido](X坐标,Y坐标和标记名称)中的信息为该图像添加标签.但是,我遇到的问题是没有得到这个位置.单击图像时创建一个Toast,它显示与视图本身对应的正确位置.(开头为零,依此类推)
但是,一旦用户点击列表中的另一个项目,如何更新位置,以便与Sashido中数组中的位置对应的标记与该位置匹配RecyclerView,因为此时Sashido类中的第一行是用该行的标签填充所有图像.
我的假设是将位置传递给getTagInformation()方法使用,getLayoutPosition()这样当objects.get(position)调用数组时,它将为Sashido类获得相同的位置,但事实并非如此.我觉得在用户点击新项目后,必须不能正确更新适配器.
onBindViewHolder:
@Override
public void onBindViewHolder(RecyclerViewHolderPreviousPosts holder, int position) {
holder.bind(previousPostsList.get(position), listener);
}
Run Code Online (Sandbox Code Playgroud)
onBind:
void bind(final PreviousPostsDataModel model, final OnItemClickListener listener) { ...
uploadedImage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (count == 0) {
imageid = model.getImageId();
Toast.makeText(App.getContext(), "Image ID: " + imageid, Toast.LENGTH_SHORT).show();
Toast.makeText(App.getContext(), "Position: " + getAdapterPosition(), Toast.LENGTH_SHORT).show();
getTagInformation(getLayoutPosition());
} else {
Log.e("qwert", "" + imageid);
imageContainer.removeAllViews();
imageContainer.addView(uploadedImage);
count = 0; …Run Code Online (Sandbox Code Playgroud) 有没有办法在Parse中进行查询以获取最近添加的PFObject类型?
我知道我可以使用大于标准的查询,但如果有一个函数可以在没有日期时添加最新的对象,那将非常有用.
我正在使用findInBackground()不同连接类型下的方法测试Parse上的查询.当连接不可用时,有时候done()回调会在几秒钟后返回以下异常,如下所示:
com.parse.ParseException: i/o failure: org.apache.http.conn.HttpHostConnectException: Connection to https://api.parse.com refused
Run Code Online (Sandbox Code Playgroud)
但是有些时候它需要花费30-60秒才能被抛出,甚至根本不被召唤.
有没有办法控制这种行为?我想设置一个固定的超时,比如10秒.
因此,每当我更新我的应用程序时,Xcode声称即使它在那里也找不到特定的外部框架.它再次发生在Xcode 6和我常用的方法(我相当缺乏经验,所以这些基本上涉及点击和输入事情直到发生事情(我夸大但不是太多))不起作用.
我收到一条Lexical or Preprocessor Issue错误,'Parse/Parse.h' file not found.' 但是这里有它在项目中的截图并添加到库中:


我还按照'ld:warning:找不到选项的目录'中最热门答案的步骤,但仍然没有.
知道该怎么办?有什么想法吗?我在这里撕扯我的头发.
如果使用Parse Push,是否可以在Android上的通知抽屉中更改通知中图标的背景颜色?
我正在谈论你可以从下面的图片中看到的圆圈的背景颜色
提前致谢,
阿德里亚诺

我使用Swift和Xcode 6构建了一个iPhone应用程序,并使用Parse框架来处理服务.
在关于如何设置推送通知的Parse教程之后,指示建议我将推送通知放在App Delegate文件中.
这是我添加到App Delegate文件的代码...
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var pushNotificationsController: PushNotificationController?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Register for Push Notifications
self.pushNotificationsController = PushNotificationController()
if application.respondsToSelector("registerUserNotificationSettings:") {
println("registerUserNotificationSettings.RegisterForRemoteNotificatios")
let userNotificationTypes: UIUserNotificationType = (.Alert | .Badge | .Sound)
let settings:UIUserNotificationSettings = UIUserNotificationSettings(forTypes: userNotificationTypes, categories: nil)
application.registerUserNotificationSettings(settings)
application.registerForRemoteNotifications()
}
return true;
}
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
println("didRegisterForRemoteNotificationsWithDeviceToken")
let installation = PFInstallation.currentInstallation()
installation.setDeviceTokenFromData(deviceToken)
installation.saveInBackground()
}
}
Run Code Online (Sandbox Code Playgroud)
所以会发生的情况是,第一次启动应用程序时,系统会提示用户授予这些权限.
我想要做的只是在某个动作发生后(即,在应用程序功能的演练期间)提示这些权限,所以我可以提供更多关于为什么我们希望它们允许推送通知的上下文. …
我正在使用parse.comAndroid SDK管理我的应用中的一些图片.是cancel()停止与parse.com服务器进行交易的唯一方法吗?
最小的例子:
final ParseFile file = ... ;
file.getDataInBackground(new GetDataCallback() {
//called when loading is done
@Override
public void done(byte[] bytes, ParseException e) {
Log.e(TAG, String.valueOf(bytes == null));
}
}, new ProgressCallback() {
//called to notify progress
@Override
public void done(Integer integer) {
Log.e(TAG, String.valueOf(integer));
if (integer > 50) {
file.cancel();
}
}
});
Run Code Online (Sandbox Code Playgroud)
我希望在达到50%之后加载停止,但事实并非如此.我在这种情况下的登录将是:
1
2
3
....
49
50
51
....
98
99
100
true
Run Code Online (Sandbox Code Playgroud)
与您调用的cancel()次数和次数不同的唯一区别是,如果您取消了byte[]结果,则为null.但这确实是次要的,这里的重点是file …
从站点获取.NET示例的csc.exe错误.在Windows 10 x64环境中运行; 项目以Win 8进入,并被要求重新定位到8.1.现在项目没有建立.打开诊断日志记录以获取详细信息.有没有办法获得在构建时调用的完整命令行?
描述"csc.exe"退出,代码为-532462766.项目文件C:\ Program Files(x86)\ MSBuild\14.0\bin\Microsoft.CSharp.CurrentVersion.targets第246行
parse-platform ×10
android ×3
ios ×3
swift ×2
xcode ×2
xcode6 ×2
.net ×1
client-side ×1
crop ×1
ios8 ×1
java ×1
javascript ×1