我有一个UITableView,其中有3个图像.1表示所选单元格,1表示单元格背景,1表示TableView背景.
我选择的Cell,工作正常,但是正常单元格和TableView背景(当你向下滚动/向上滚动时,单元格背后的背景)存在一些问题
有人可以帮助我为每个单元格和TableView背景提供背景吗?怎么做的?
正常细胞背景:(不确定它是否正确)
// CELL'S BACKGROUND-IMAGE
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cell_normal.PNG"]];
Run Code Online (Sandbox Code Playgroud)
选定的细胞背景:
// SELECTED CELL'S BACKGROUND-IMAGE
UIView *viewSelected = [[[UIView alloc] init] autorelease];
viewSelected.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"cell_highlighted.PNG"]];
cell.selectedBackgroundView = viewSelected;
Run Code Online (Sandbox Code Playgroud) 我有一个带逗号的数字,例如:254,5.我需要0背后,5所以它代表254,50...
我用这个来得到这个数字:
Math.floor(iAlt / 50) * 50;
Run Code Online (Sandbox Code Playgroud)
我怎么能得到0背后的,5?
我正在尝试制作一个倒计时程序,我可以开始和停止,并在需要时将倒计时的值设置为10分钟.
但我收到的错误我不太明白.我不是那样的C#,所以这里是代码:
有人可以帮我一点吗?想想我在框架3.0上运行什么?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Timers;
namespace PauseMaster
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
}
private DateTime endTime;
private void btnStartStop_Click(object sender, EventArgs e)
{
if(btnStartStop.Text == "START")
{
int hours = int.Parse(string.IsNullOrEmpty(txtCountFromHour.TextBox.Text) || txtCountFromHour.TextBox.Text == "timer" ? "0" : txtCountFromHour.TextBox.Text);
int mins = int.Parse(string.IsNullOrEmpty(txtCountFromMin.TextBox.Text) || txtCountFromMin.TextBox.Text == "minutter" ? "0" …Run Code Online (Sandbox Code Playgroud) 我将我的内容从DBwith PHP,加载到我的 div 中。
我dropdown上面有一个,我应该可以在那里整理内容,这意味着dropdown选择时,将div删除其中的旧内容,并出现新内容。
那么如何才能“删除” 中的旧内容div,并基于 获得新内容dropdown selection呢?
这是我到目前为止得到的:
<div class="col-md-4">
<ul class="nav nav-tabs top_nav">
<li role="presentation" class="active"><a href="#">Edit</a></li>
<li role="presentation" class="inactive">
<!-- THE DROPDOWN THAT SHOULD SORT THE CONTENT BELOW -->
<!-- REMOVE OLD, AND GET NEW AFTER SELECTED -->
<select id="filter_type">
<option selected value="Alle">Alle</option>
<option value="Privat_Tale">Privat Tale</option>
<option value="Erhverv_Tale">Erhverv Tale</option>
<option value="Gamle">Gamle</option>
<option value="Privat_MBB">Privat MBB</option>
<option value="Erhverv_MBB">Erhverv MBB</option>
<option value="Familietele">Familietele</option>
<option value="Retention">Retention</option>
</select>
</li> …Run Code Online (Sandbox Code Playgroud) 我需要使用javascript从div-tag中查找/获取一个名为"group"的类.之后,我想在我刚发现的div中插入一个html按钮(input = submit).
如何用javascript完成?
到目前为止我已经尝试过这个,但得到并且错误:文件未被声明!
var myMessage = 'Mange tak';
var html_kode = '<input type="submit" onclick="clickedelm = this.value" id="qr_tak" tabindex="1" name="sbutton" title="(Alt + A)" accesskey="a" value="Auto Tak" class="button">';
if(myMessage) {
var find_class = document.getElementsByClassName('group');
if (find_class) {
find_class.innerHTML += html_kode;
}
}
Run Code Online (Sandbox Code Playgroud) 所以我需要,当我鼠标悬停时#3.双方#1并#2得到一个特定的CSS类.如果我将鼠标悬停#5,那么所有div都会获得css类.
当他们不再徘徊时,班级将从div中移除.
<div class="rateStar"><a href="#1"><img src="/images/images/stars.png"/></a></div>
<div class="rateStar"><a href="#2"><img src="/images/images/stars.png"/></a></div>
<div class="rateStar"><a href="#3"><img src="/images/images/stars.png"/></a></div>
<div class="rateStar"><a href="#4"><img src="/images/images/stars.png"/></a></div>
<div class="rateStar"><a href="#5"><img src="/images/images/stars.png"/></a></div>
Run Code Online (Sandbox Code Playgroud)
但我对如何做到这一点有点失落,有人可以帮助我吗?
我有一个UITableView,我希望每个单元格都是50px的固定高度,如何在Xcode4中完成?
继承我的tableview,从XIB文件加载
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
Run Code Online (Sandbox Code Playgroud) 我有一些复选框,其中所有都有不同的值但所有数字.
我想获取检查的值,然后将数字加在一起,然后在我的div中显示结果.
<div id="pakker">
<input type="checkbox" value="39" />test 1<br/>
<input type="checkbox" value="79" />test 2<br/>
<input type="checkbox" value="29" />test 3<br/>
<input type="checkbox" value="49" />test 4<br/>
ect
</div>
Run Code Online (Sandbox Code Playgroud)
到目前为止我所拥有的是: var pakker = $('#pakker checkbox:checked').val();
更新:
我想要的结果:<h1 id="sk">0</h1>
但它并没有真正起作用,虽然我没有收到任何错误.
有谁知道如何做到这一点,尽可能容易?
所以我买了这个应用程序,而开发人员也无法就此问题进行联系,所以我希望可以在这里得到一些帮助。
当我在Xcode中构建应用程序时,出现错误消息:
GGDraggableView.m: Implicit declaration of function 'min' is invalid in C99
Run Code Online (Sandbox Code Playgroud)
我还不太擅长Obj-c或Swift,所以我仍然在学习。
我试图在Google和此处查找错误,但无法真正获得任何答案。
#import "GGDraggableView.h"
#import "GGOverlayView.h"
@interface GGDraggableView ()
@property(nonatomic, strong) UIPanGestureRecognizer *panGestureRecognizer;
@property(nonatomic) CGPoint originalPoint;
@property(nonatomic, strong) GGOverlayView *overlayView;
@end
@implementation GGDraggableView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (!self) return nil;
self.overlayView = [[GGOverlayView alloc] initWithFrame:self.bounds];
self.overlayView.alpha = 0;
[self addSubview:self.overlayView];
return self;
}
-(void)awakeFromNib
{
self.panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(dragged:)];
[self addGestureRecognizer:self.panGestureRecognizer];
self.backgroundColor = [UIColor whiteColor];
}
- (void)loadImageAndStyle
{
UIImageView …Run Code Online (Sandbox Code Playgroud) html ×2
iphone ×2
javascript ×2
jquery ×2
uitableview ×2
.net ×1
add ×1
background ×1
c# ×1
checkbox ×1
css ×1
height ×1
hover ×1
ios ×1
math ×1
mysql ×1
objective-c ×1
php ×1