刚刚在我的macbook pro上安装了android sdk.我创建了一个虚拟设备,在android 3.0中分配了50mb的内存.我运行了模拟器,左侧显示了Android_,但右侧没有显示键盘界面.我启用了hw.keyboard.lid.不确定这是否与它有关.
我现在正试图复制这个:

如果您熟悉Google的应用程序,它看起来像具有自定义流程布局的UICollectionView.
我正在扩展一个已经用一些额外的代码关闭的问题.
在自定义流布局类中,我可以通过设置负最小行距值来创建"堆叠"效果,并使用以下内容:
- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect
{
NSArray *allAttributesInRect = [super layoutAttributesForElementsInRect:rect];
CGPoint centerPoint = CGPointMake(CGRectGetMidX(self.collectionView.bounds), CGRectGetMidY(self.collectionView.bounds));
for (UICollectionViewLayoutAttributes *cellAttributes in allAttributesInRect)
{
if (CGRectContainsPoint(cellAttributes.frame, centerPoint))
{
cellAttributes.transform = CGAffineTransformIdentity;
cellAttributes.zIndex = 1.0;
}
else
{
cellAttributes.transform = CGAffineTransformMakeScale(0.75, 0.75);
}
}
return allAttributesInRect;
}
Run Code Online (Sandbox Code Playgroud)
用于删除动画的滑动工作正常,但我无法创建"堆叠"外观,然后将1个单元格向上拖动到视图中,同时保持剩余的卡片堆叠,就像您在上面看到的那样.
我正在尝试提供一个UITableView,我已经为用户提供了数据并保存在解析中.我很确定我没有提供导航视图.
当我登录时,我收到错误:
Checklists[4516:c07] Warning: Attempt to present <ChecklistsViewController: 0x10525e90>
on <UINavigationController: 0x9648270> while a presentation is in progress!
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助.
#import "LoginViewController.h"
#import "ChecklistsViewController.h"
#import "SetupViewController.h"
#import <Parse/Parse.h>
@interface LoginViewController ()
@end
@implementation LoginViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
PFLogInViewController *login = [[PFLogInViewController alloc] init];
login.fields = PFLogInFieldsFacebook;
// Need to set the delegate to be this controller.
login.delegate = …Run Code Online (Sandbox Code Playgroud) 我是VBA的新手,我正在尝试创建一个简单的宏,其中一个可以突出显示一组单元格,单击一个按钮,并删除所选的销售.之后,您可以再次选择单元格,单击相同的按钮,然后删除删除线.
我一直在寻找体面的文档,但还没有找到任何东西.
这是一些代码.
另外,我很想知道VBA最佳文档的位置.
Sub strikeOut()
Selection.Font.Strikethrough = True
End Sub
Run Code Online (Sandbox Code Playgroud)
我还需要命令按钮的帮助.
谢谢.
注意:当我点击该行时,应用程序崩溃.
我正在尝试在用户点击时添加新单元格.我发现在WWDC 2011的表格视图演示中有一个类似的例子.这是我的表视图中的代码.
这是错误:
2013-03-19 20:04:28.672 Project[51229:c07] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-2380.17/UITableView.m:1070
Run Code Online (Sandbox Code Playgroud)
这是表视图中的代码.
@interface MyPFQueryTableViewController : PFQueryTableViewController <PFLogInViewControllerDelegate, PFSignUpViewControllerDelegate>
@property (nonatomic, strong) NSIndexPath *controlRowIndexPath;
@property (nonatomic, strong) NSIndexPath *tappedIndexPath;
@implementation MyPFQueryTableViewController {
ListItemObject *listDetail;
}
@synthesize controlRowIndexPath;
@synthesize tappedIndexPath;
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
PFObject *object = [self.objects objectAtIndex:indexPath.row];
[object deleteInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
[self loadObjects];
}];
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object {
static NSString *CellIdentifier …Run Code Online (Sandbox Code Playgroud) 我使用parse.com服务器发送和检索我的iOS应用程序数据.我想保存歌曲列表,每首歌曲都有以下属性(标题,艺术家,专辑).我的代码片段在这里;
-(IBAction)saveSongsData:(id)sender {
PFObject *newPlayer = [PFObject objectWithClassName:@"Players"];
/*[newPlayer addObjectsFromArray:self.songsArrray forKey:@"songs"];
here i got the exception, if i uncomment it*/
[newPlayer setObject:self.txtPlayerName.text forKey:@"playerName"];
[newPlayer setObject:self.txtPlayerDesc.text forKey:@"playerDescription"];
[newPlayer setObject:self.txtPlayerPass.text forKey:@"playerPassword"];
NSString *objectId = [newPlayer objectId];
[[NSUserDefaults standardUserDefaults]setObject:objectId forKey:@"id"];
[newPlayer saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (!error) {
}
else {
}
}];
}
Run Code Online (Sandbox Code Playgroud)
self.songsArray具有以下属性的歌曲对象数组在哪里;
标题,艺术家,专辑.
但是当我尝试使用这行代码保存我的歌曲数据时.
[newPlayer addObjectsFromArray:self.songsArrray forKey:@"songs"];
Run Code Online (Sandbox Code Playgroud)
我有一个例外,这是消息: -
由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'PFObject值必须可序列化为JSON'
请帮助我,如何以JSON格式将我的歌曲数据发送到服务器.谢谢.
所以,我非常喜欢Android上的Google Now卡片界面.最近它甚至还来到了iOS.
是否有任何教程或示例项目可以帮助我为我的iOS应用程序创建卡片界面?
根据我的研究,我已经能够使用自定义UICollectionViewFlowLayout复制"堆叠"卡.
- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect
{
NSArray *allAttributesInRect = [super layoutAttributesForElementsInRect:rect];
CGPoint centerPoint = CGPointMake(CGRectGetMidX(self.collectionView.bounds), CGRectGetMidY(self.collectionView.bounds));
for (UICollectionViewLayoutAttributes *cellAttributes in allAttributesInRect)
{
if (CGRectContainsPoint(cellAttributes.frame, centerPoint))
{
cellAttributes.transform = CGAffineTransformIdentity;
cellAttributes.zIndex = 1.0;
}
else
{
cellAttributes.transform = CGAffineTransformMakeScale(0.75, 0.75);
}
}
return allAttributesInRect;
}
Run Code Online (Sandbox Code Playgroud)
然后我将最小行间距设置为负值,使它们显示为"堆叠".
滚动时,我希望卡片保持在底部,只有一辆汽车可以向上扩展并在屏幕中居中.然后我会将该卡从屏幕上滚动,堆栈中的下一张"卡片"将从堆栈向上滚动并在屏幕上居中.我猜这会动态调整最小行间距?
这是我的代码.我是VBA的新手,所以我不确定如何遍历多个页面.
这是我的代码:
Dim ws As Worksheet
Sub spellCheck()
For Each ws In ActiveWorkbook.Worksheets
Cells.CheckSpelling
Next
End Sub
Run Code Online (Sandbox Code Playgroud) 这个方法与我的showAnswer方法完全相同似乎很不寻常,所以我想我会问这里.
#import "QuizViewController.h"
@interface QuizViewController ()
@end
@implementation QuizViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
// Call the init method implemented by the superclass
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Create two arrays and make the pointers point to them
questions = [[NSMutableArray alloc] init];
answers = [[NSMutableArray alloc] init];
// Add questions and answers to the arrays
[questions addObject:@"What is 7 + 7?"];
[answers addObject:@"14"];
[questions addObject:@"What is the capital of Vermond?"];
[answers addObject:@"Montpelier"];
[questions addObject:@"From …Run Code Online (Sandbox Code Playgroud) 我正在制作一个地址簿,我希望用户能够对他们的联系人进行颜色编码[例如所有'朋友'都是用蓝色字体打印,所有家庭都是绿色等等.]我添加了复选框,我'添加动作侦听器.但是,我收到编译错误.
friend = new JCheckBox("Friend");
coWorker = new JCheckBox("Business");
family = new JCheckBox("Family");
miscellaneous = new JCheckBox("Miscellaneous");
jPanel4.add(friend);
jPanel4.add(coWorker);
jPanel4.add(family);
jPanel4.add(miscellaneous);
HandlerClass handler = new HandlerClass();
friend.addItemListener(handler);
coWorker.addItemListener(handler);
family.addItemListener(handler);
miscellaneous.addItemListener(handler);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
AddressBookMain.addEntry(new AddressBook(jTextField1.getText(), jTextField2.getText(), jTextField3.getText(), jTextField4.getText()));
}
});
`private class HandlerClass implements ItemListener {
public void itemStateChanged(ItemEvent event) {
jTextField1.setFont(Color.BLUE);
}
}`
Run Code Online (Sandbox Code Playgroud) 我在parse.com上挖掘了一些教程,我对用户创建对象并将其存储在Parse中没有问题.
我不知道该怎么做是将一个对象传递给另一个用户.因此,例如,如果我有自己的用户列表,并且朋友想要添加到其他用户的待办事项列表,我将如何进行此操作?所以一个用户会创建对象:
PFObject *task = [PFObject objectWithClassName:@"ToDo"];
[task setObject:@"Do the dishes" forKey:@"userName"];
[task save];
Run Code Online (Sandbox Code Playgroud)
但我希望这个用户将任务传递给他们的朋友,所以当他们的朋友启动应用程序时,他们会看到任务已添加到他们的列表中.
我也在使用Facebook SDK,所以如果有什么可以提供帮助,我可以使用它.
我以前没有使用过Core Data,所以我希望用解析来处理很多后端工作,这样我就可以暂时避开学习曲线了.
谢谢你的帮助
我想补充一点,我不一定在寻找"答案".我之前没有做过这样的事,我不知道在哪里看.
这是我得到的例外:
Exception in thread "main" java.lang.NullPointerException
at BankAccountDemo.DisplayAccountFees(BankAccountDemo.java:91)
at BankAccountDemo.main(BankAccountDemo.java:30)
Run Code Online (Sandbox Code Playgroud)
每当我尝试打印或查看评估费用的所有帐户时,我也会收到此异常.
这是我的驱动程序.它有5个类,也在下面.其中一个是带有3个后代的抽象类.
DRIVER
import java.io.*;
import java.util.Scanner;
import java.util.ArrayList;
public class BankAccountDemo
{
public static void main(String[] args)
{
while(true) {
Scanner keyboard = new Scanner(System.in);
System.out.println("=========Menu========");
System.out.println("1. Add an account.");
System.out.println("2. To print the names of all accounts together with the fees assessed");
System.out.println("3. To print all accounts together with owner information");
System.out.println("4. To exit program");
System.out.println("Your choice: ");
int input = keyboard.nextInt();
switch(input)
{
case 1:
InputAccount();
break; …Run Code Online (Sandbox Code Playgroud) 我相信我用这个
- (CGFloat) tableView: (UITableView *) tableView heightForRowAtIndexPath: (NSIndexPath *) indexPath
Run Code Online (Sandbox Code Playgroud)
但是,我不确定如何实现这一点.我有一个按钮,我已经放在UITableView上方添加一行.手动降低UITableView不起作用.谢谢您的帮助.
ios ×8
objective-c ×7
xcode ×4
excel ×2
excel-vba ×2
google-now ×2
java ×2
vba ×2
android ×1
excel-2010 ×1
facebook ×1
iphone ×1