IOS: Check Core Data Object is null
Code
@property (nonatomic,retain) TipRecord*record; |
To check the object in the code above, that should check whether the object is nil.
Code
if(self.record == nil) |
Please note that, that is a pointer. If it has not initialized yet, it will be nil, not NSNull null.
Code
if([self.record isEqualToString [NSNull null]) |
null is a value for nothings, all pointer won't be null, unless you assign that is null object to there.
Free Bootstrap Templates @ BootstrapZero
I found a good website for Bootstrap, BootstrapZero.. There are some starter kit to build a bootstrap website, such as a basic image slider website, admin console and silde bar website. Moreover, there are a number good free bootstap templates, such as a google plus like and facebook like templates. All of them are free of charge under a MIT License. I found there are enough resources to build a website. I do not need to buy other stuff online.
Horizontal Stackpanel in WPF
Stackpanel is a useful layout control in WPF. If you have a set of elements need to sit side by side each other, this is your best option. For example, in my advgen contact manager, in the right hand side, there is a set of buttons. Thus, I placed a stack panel. However, by the default, the controls inside the panel will flow in vertical direct, you need to set Orientation="Horizontal"
E.g.
<StackPanel FlowDirection="LeftToRight" Orientation="Horizontal">
Styles in WPF
I have some styling in my WPF opensource project, AdvGen Contact Manager. That is similar with css, just state the class name like :
<Grid
Grid.Column="1"
Name="ContentPanel"
Style="{StaticResource BluePanel}">
UIAlertView Button Click in IOS
if you only have an ok button for alert view, that is easy.
However, if you have more than an "OK" button, you need to implement your controller as UIAlertViewDelegate
For example:
@interface TipRecordListViewController : UITableViewController < uialertviewdelegate >
You need to implement clickedButtonAtIndex
E.g.
Code
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ |
The buttonIndex will tell you which button is clicked