小编tes*_*ing的帖子

将带有两个UIBarButtonItem的UIToolbar添加到UINavigationBar:可怜的UIToolbar以及iPhone 4怎么样

我正在跟随这里的第二个提示.在这篇技巧文章中,两个UIBarButtonItems放在UIToolbar中.最后,UIToolbar被添加到UINavigationBar中.现在我的问题:

1)UIToolbar顶部有一条白线.如果我增加UIToolbar的大小,则渐变是错误的.我在UIToolbar上使用以下大小:

    UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 90, 44.01)];
Run Code Online (Sandbox Code Playgroud)

我该怎样摆脱白线?看这里: 替代文字

问题是存在白色而不是灰色线.如果它是灰色的,一切都会很完美.

2)iPhone 3和iPhone 4的显示尺寸有何不同?我是否必须检查使用哪个iPhone然后加倍?

编辑:

这些按钮的创建方式类似于我从上述网站获取的以下示例:

// create a toolbar to have two buttons in the right
UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 133, 44.01)];

// create the array to hold the buttons, which then gets added to the toolbar
NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:3];

// create a standard "add" button
UIBarButtonItem* bi = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:NULL];
bi.style = UIBarButtonItemStyleBordered;
[buttons addObject:bi]; …
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch objective-c uinavigationbar uitoolbar

8
推荐指数
1
解决办法
1万
查看次数

如何在Xcode中安装证书(准备提交应用商店)

我不想Code Signing Identity在目标的构建选项卡中选择我的分发配置文件.但我的所有证书(开发人员,临时,......)都是灰色的.所以似乎没有安装新的配置文件XXX.mobileprovision.准则说

下载分发配置文件并将其安装在Xcode Organizer中.将.mobileprovision文件拖到管理器中IPHONE DEVELOPMENT下的Provisioning Profiles列表中.

但没有任何反应.没有绿色加号图标出现.

如果我双击配置文件,Xcode会显示一个空文件...

有人可以帮我吗?

附加信息:

首先,我创建了一个Ad-Hoc配置文件(带有另一个包标识符),它可以工作(现在).Mac上的证书所有者和用户名不相同(但私钥是在此用户名下创建的).在Xcode中,我只能看到旧的开发人员证书(来自Ad-Hoc配置文件).

我将应用程序设置为Release.

iphone xcode submission certificate app-store

8
推荐指数
4
解决办法
9万
查看次数

Qt for Symbian VS. Qt for MeeGo

Qt for Symbian和Qt for MeeGo有什么区别?我知道Qt是一个交叉编译平台.这是否意味着如果我使用来自Qt的库,完全相同的库适用于支持Qt的所有设备(例如Symbian,MeeGo)?

例如:

QtDesktopServices可以启动Web浏览器.尽管名称"桌面"让移动设备混乱,我可以在支持Qt的每台设备上启动网络浏览器吗?如果我看MeeGo,MeeGo可用于不同类型的设备,例如车载,电视,媒体电话

是否保证每台设备都有网络浏览器?我不这么认为,这就是我要问的原因.如果保证浏览器,它是哪个浏览器?它有哪些功能?我知道有WRT,但是这里的用户说WRT已经停止.所以现在怎么办?

我必须在Qt 4.7和Qt Mobility 1.0之间做出选择吗?

qt symbian meego

8
推荐指数
2
解决办法
625
查看次数

TYPO3更新:找不到已弃用的RTE属性

我想从TYPO3 4.7.5更新到TYPO3 4.7.10.现在我在Upgrade Wizard,它说:

页面TSconfig中不推荐使用的RTE属性

自TYPO3 4.6起,以下页面TSconfig RTE属性将被弃用,并将在TYPO3 6.0中删除.

不推荐使用的属性使用
disableRightClick contextMenu.disable
disableContextMenu contextMenu.disable
hidePStyleItems buttons.formatblock.removeItems
hideFontFaces buttons.fontstyle.removeItems
fontFace buttons.fontstyle.addItems
hideFontSizes buttons.fontsize.removeItems
classesCharacter buttons.textstyle.tags.span.allowedClasses
classesParagraph buttons.blockstyle .tags.div.allowedClasses
classesTable buttons.blockstyle.tags.table.allowedClasses
classesTD buttons.blockstyle.tags.td.allowedClasses
classesImage buttons.image.properties.class.allowedClasses
classesLinks buttons.link.properties.class.allowedClasses
blindImageOptions buttons.image .options.removeItems
blindLinkOptions buttons.link.options.removeItems
defaultLinkTarget buttons.link.properties.target.default
fontSize buttons.fontsize.addItems
RTE.default.classesAnchor RTE.default.buttons.link.properties.class.allowedClasses RTE.default. classesAnchor.default.[link-type] RTE.default.buttons.link.[link-type] .properties.cl ass.default mainStyleOverride contentCSS mainStyleOverride_add.[key] contentCSS mainStyle_font contentCSS mainStyle_size contentCSS
mainStyle_color contentCSS mainStyle_bgcolor contentCSS
inlineStyle.[any-keystring] contentCSS ignoreMainStyleOverride na disableTYPO3Browsers buttons.image.TYPO3Browser.disabled和buttons.link.TYPO3Browser.disabled
showTagFreeClasses buttons.blockstyle. showTagFreeClasses and buttons.textstyle.showTagFreeClasses
disablePCexamples buttons.blockstyle.disableStyleOnOptionLabel and buttons.textstyle.disableStyleOnOptionLabel您当前正在1页面(包括已删除和隐藏的页面)中使用这些属性中的一些. …

typo3 updates rte deprecated typoscript

8
推荐指数
1
解决办法
2352
查看次数

使用LINQ查找重叠的时间段(事件)

我有一个事件列表,现在我想找出哪些事件重叠.您可以在下面找到我目前拥有的代码,但我遇到的问题是,搜索到的项目也包含在列表中.

List<SomeEventObject> overlappingEvents = new List<SomeEventObject>();
foreach (SomeEventObject eventItem in EventList)
{
    bool overlapping = false;
    foreach (SomeEventObject anotherEventItem in EventList)
    {
        if (eventItem.StartDate <= anotherEventItem.EndDate &&
            eventItem.EndDate >= anotherEventItem.StartDate)
        {
            overlapping = true;
            overlappingEvents.Add(anotherEventItem);
        }
    }

    if (overlapping)
        overlappingEvents.Add(eventItem);
}
Run Code Online (Sandbox Code Playgroud)

我需要创建一个没有搜索项目的新列表.因此我问是否有一个很好的LINQ表达式可以为我处理.这是我想到的一些伪代码:

EventList.Where(e => 
                eventItem.StartDate <= e.EndDate && 
                eventItem.EndDate >= e.StartDate);
Run Code Online (Sandbox Code Playgroud)

在这种情况下,eventItem当然不存在.

结果我认为我需要两个列表:一个具有重叠事件,一个具有非重叠事件.但.Except()如果我有重叠的事件列表,这应该是可能的.

编辑:

我创建了一个dotnetfiddle,以便人们可以玩它.一个重要的问题是重叠算法.

活动1:
StartDate:今天,10
:00 EndDate:今天,10:05

事件2:
StartDate:今天,10
:05 EndDate:今天,10:10

如果您向用户提供此信息,则不会重叠.所以我要修改我的算法.

c# linq

8
推荐指数
2
解决办法
3115
查看次数

Xamarin.Forms:在UWP中悬停时自定义按钮样式

我已经App.xaml在Xamarin Forms项目中定义了一些样式.但是,如果将鼠标悬停在按钮上或按下按钮,则不会影响该按钮.字体颜色在此处更改为黑色,并且按钮周围出现灰色边框.现在我要覆盖这种风格.

首先尝试:App.xaml为UWP项目添加定义

<Application
    x:Class="YourApp.UWP.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:YourApp.UWP"
    RequestedTheme="Light">

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.ThemeDictionaries>
                <ResourceDictionary x:Key="Light">
                    <SolidColorBrush x:Key="ButtonPointerOverBackgroundThemeBrush" Color="#00FF00" />
                </ResourceDictionary>
            </ResourceDictionary.ThemeDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
Run Code Online (Sandbox Code Playgroud)

结果:完全没有变化

第二次尝试:覆盖UWP项目中的PointOver视觉状态App.xaml

<Application
    x:Class="YourApp.UWP.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:YourApp.UWP"
    RequestedTheme="Light">

    <Application.Resources>
        <ResourceDictionary>
            <Style TargetType="Button" x:Key="HoverButtonStyle">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="PointerOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                                                Storyboard.TargetProperty="Background">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="#00FF00" />
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
                                                                                Storyboard.TargetProperty="Foreground">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="#00FF00" />
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value> …
Run Code Online (Sandbox Code Playgroud)

button xamarin xamarin.forms uwp windows-10-universal

8
推荐指数
1
解决办法
5268
查看次数

更改导航项的背景颜色(条)

有一种简单的方法可以在视图顶部更改导航项的背景颜色吗?我有一个基于导航的应用程序,我只希望一个视图获得另一种背景颜色.我主要用IB创建了视图.我找到了以下解决方案(未经测试):

float r=10;
float g=55;
float b=130;
float a=0;

UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 120, 30)];
[label setBackgroundColor:[UIColor colorWithRed:r/255.f
                                          green:g/255.f
                                           blue:b/255.f    
                                          alpha:a/255.f];];
[self.navigationController.navigationBar.topItem setTitleView:label];
[label release];
Run Code Online (Sandbox Code Playgroud)

是否有更简单的方式

[navigationController.navigationBar setBackgroundColor:blueColor]
Run Code Online (Sandbox Code Playgroud)

或者我可以使用IB(但在每个视图中没有相同的颜色)吗?

提前谢谢了!

干杯

iphone xcode objective-c

7
推荐指数
1
解决办法
3万
查看次数

使用日历作为日期选择器

我想弹出一个日历控件(比如Apple提供的日历中的月视图),它可以用作日期选择器.我已经做了一些研究,但我问我是否错过了什么.

有几个免费的库:

    *Kal
    *GCCalendar
    *TapkuLibrary
    *iphonecal
    *iphone-gcal

还有一个商业图书馆:

    *DTCalendarViewController

同样重要的是国际化.你知道另一个可以提供这个的图书馆吗?或者如何调整免费的可用库以将日历月视图用作日期选择器?

iphone xcode cocoa-touch calendar objective-c

7
推荐指数
1
解决办法
1667
查看次数

如何设置ListView的ItemsSource?

这里我定义了我的数据myListOfEmployeeObjects:

public class App : Application
{
    public List<Employee> myListOfEmployeeObjects;

    public App ()
    {
        Employee emp1 = new Employee () {
            FirstName = "Max",
            LastName = "Mustermann",
            Twitter = "@fake1"
        };
        Employee emp2 = new Employee () {
            FirstName = "Evy",
            LastName = "Mustermann",
            Twitter = "@fake2"
        };
        myListOfEmployeeObjects = new List<Employee> {
            emp1, emp2
        };
        MainPage = new NavigationPage (new EmployeeListPage ());
    }
}
Run Code Online (Sandbox Code Playgroud)

比我设置的XAML ItemsSource:

<ListView x:Name="listView"
                IsVisible="false"
                ItemsSource="{x:Static local:App.myListOfEmployeeObjects}"
                ItemSelected="EmployeeListOnItemSelected">
Run Code Online (Sandbox Code Playgroud)

这有用吗?因为我明白了

Xamarin.Forms.Xaml.XamlParseException:在xmlns中找不到类型App

public partial …
Run Code Online (Sandbox Code Playgroud)

c# xaml xamarin.ios xamarin xamarin.forms

7
推荐指数
1
解决办法
1万
查看次数

Xamarin警告:应用程序图标集"AppIcons"有2个未分配的子项

编译时我收到以下警告:

警告:

/Users/some-user/Projects/SomeApp/SomeApp/SomeApp.csproj(Build) - > /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(_CoreCompileImageAssets target) - >

Resources/Images.xcassets:actool警告:应用程序图标集"AppIcons"有2个未分配的子项.

1警告

我为应用程序图标提供了每个图像(手表/汽车除外).Contents.json文件中没有"未分配"值.我还尝试取消设置每个图像并重新设置它.我还在收到警告.

目前我正在使用Xamarin Studio 5.9.7(build 22),Xamarin.iOS 9.0.1.29和Mono 4.0.4.,Xcode 7.0.1(8228)Build 7A1001.所有这些都在Mac OS X 10.10.5上运行.

如何删除警告?

mono xamarin.ios ios xamarin xamarin-studio

7
推荐指数
2
解决办法
4693
查看次数