diff --git a/components/iosdesigner/Examples/TableView/TableView.lpi b/components/iosdesigner/Examples/TableView/TableView.lpi
new file mode 100644
index 000000000..664e156a0
--- /dev/null
+++ b/components/iosdesigner/Examples/TableView/TableView.lpi
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/iosdesigner/Examples/TableView/TableView.lpr b/components/iosdesigner/Examples/TableView/TableView.lpr
new file mode 100644
index 000000000..8571df8e9
--- /dev/null
+++ b/components/iosdesigner/Examples/TableView/TableView.lpr
@@ -0,0 +1,15 @@
+program TableView;
+
+{$modeswitch ObjectiveC1}
+
+uses
+ iPhoneAll, appdelegate_iphoneu, TableData;
+
+var
+ pool : NSAutoreleasePool;
+begin
+ pool := NSAutoreleasePool.alloc.init;
+ UIApplicationMain(argc, argv, nil, nil);
+ pool.release;
+end.
+
diff --git a/components/iosdesigner/Examples/TableView/appdelegate_iphoneu.pas b/components/iosdesigner/Examples/TableView/appdelegate_iphoneu.pas
new file mode 100644
index 000000000..3050ef372
--- /dev/null
+++ b/components/iosdesigner/Examples/TableView/appdelegate_iphoneu.pas
@@ -0,0 +1,126 @@
+unit appdelegate_iphoneu;
+
+{$modeswitch ObjectiveC1}
+
+interface
+
+uses
+ Classes,
+ BufDataset,
+ iPhoneAll,
+ SysUtils,
+ TableData;
+
+type
+ TTableViewDelegate = objcclass;
+
+ { TAppDelegate_iPhone }
+
+ TAppDelegate_iPhone = objcclass(NSObject, UIApplicationDelegateProtocol)
+ UISearchBar1: UISearchBar;
+ UITableView1: UITableView;
+ UIWindow1: UIWindow;
+ procedure applicationDidFinishLaunching(application: UIApplication); message 'applicationDidFinishLaunching:';
+ private
+ objectListTableViewDelegate: TTableViewDelegate;
+ public
+ procedure dealloc; override;
+ end;
+
+ { TTableViewDelegate }
+
+ TTableViewDelegate = objcclass(NSObject, UISearchBarDelegateProtocol, UITableViewDataSourceProtocol)
+ private
+ FDataStrings: TStrings;
+ FData: TBufDataset;
+ FTableView: UITableView;
+ procedure DatasetToStringlist; message 'DatasetToStringlist';
+ public
+ function initWithData(ATableView: UITableView): TTableViewDelegate; message 'initWithData:';
+ function tableView_numberOfRowsInSection(tableView: UITableView; section: NSInteger): NSInteger; message 'tableView:numberOfRowsInSection:';
+ function tableView_cellForRowAtIndexPath(tableView: UITableView; indexPath: NSIndexPath): UITableViewCell; message 'tableView:cellForRowAtIndexPath:';
+ procedure searchBarSearchButtonClicked(searchBar: UISearchBar); message 'searchBarSearchButtonClicked:';
+ procedure dealloc; override;
+ end;
+
+implementation
+
+{ TTableViewDelegate }
+
+procedure TTableViewDelegate.DatasetToStringlist;
+begin
+ FDataStrings.Clear;
+ FData.First;
+ while not FData.EOF do
+ begin
+ FDataStrings.Append(FData.FieldByName('name').asstring);
+ FData.Next;
+ end;
+end;
+
+function TTableViewDelegate.initWithData(ATableView: UITableView
+ ): TTableViewDelegate;
+var
+ AnAlertView: UIAlertView;
+begin
+ result := init;
+ FData:= CreateDataset;
+ FDataStrings := TStringList.Create;
+ FTableView := ATableView;
+ DatasetToStringlist;
+end;
+
+function TTableViewDelegate.tableView_numberOfRowsInSection(
+ tableView: UITableView; section: NSInteger): NSInteger;
+begin
+ result := FDataStrings.Count;
+end;
+
+function TTableViewDelegate.tableView_cellForRowAtIndexPath(
+ tableView: UITableView; indexPath: NSIndexPath): UITableViewCell;
+var
+ s: nsstring;
+begin
+ result := tableview.dequeueReusableCellWithIdentifier(NSSTR('DefTableItem'));
+ if not assigned(result) then
+ result := UITableViewCell.alloc.initWithStyle_reuseIdentifier(UITableViewStylePlain,NSSTR('DefTableItem'));
+ s := NSString.alloc.initWithUTF8String(pchar(FDataStrings[indexPath.row]));
+ result.textLabel.setText(s);
+end;
+
+procedure TTableViewDelegate.searchBarSearchButtonClicked(searchBar: UISearchBar);
+var
+ AnAlertView: UIAlertView;
+begin
+ FData.Filter:='name="*'+searchBar.text.cString+'*"';
+ FData.Filtered:=true;
+ DatasetToStringlist;
+ FTableView.reloadData;
+end;
+
+procedure TTableViewDelegate.dealloc;
+begin
+ FData.Free;
+end;
+
+procedure TAppDelegate_iPhone.applicationDidFinishLaunching(
+ application: UIApplication);
+begin
+ objectListTableViewDelegate:=TTableViewDelegate.alloc.initWithData(UITableView1);
+ UITableView1.setDataSource(objectListTableViewDelegate);
+ UISearchBar1.setDelegate(objectListTableViewDelegate);
+end;
+
+procedure TAppDelegate_iPhone.dealloc;
+begin
+ objectListTableViewDelegate.release;
+ UISearchBar1.release;
+ UITableView1.release;
+ UIWindow1.release;
+ inherited dealloc;
+end;
+
+{$FakeResource *.xib}
+
+end.
+
diff --git a/components/iosdesigner/Examples/TableView/appdelegate_iphoneu.xib b/components/iosdesigner/Examples/TableView/appdelegate_iphoneu.xib
new file mode 100644
index 000000000..a80bc793c
--- /dev/null
+++ b/components/iosdesigner/Examples/TableView/appdelegate_iphoneu.xib
@@ -0,0 +1,201 @@
+
+
+
+ 1280
+ 11D50
+ 2182
+ 1138.32
+ 568.00
+
+
+ IBUIWindow
+ IBUICustomObject
+ IBUIButton
+ IBProxyObject
+
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delegate
+
+ 3
+
+
+
+
+
+ UIWindow1
+
+ 5
+
+
+
+
+
+ UITableView1
+
+ 7
+
+
+
+
+
+ UISearchBar1
+
+ 9
+
+
+
+
+
+ 0
+
+
+
+
+
+ -1
+
+
+ File's Owner
+
+
+ -2
+
+
+
+
+ 2
+
+
+ AppDelegate_iPhone
+
+
+ 4
+ UIWindow1
+
+
+
+
+
+
+
+
+ 6
+ UITableView1
+
+
+
+
+ 8
+ UISearchBar1
+
+
+
+
+
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ TAppDelegate_iPhone
+
+
+
+
+
+ 13
+
+
+
+ YES
+
+ AppDelegate
+ NSObject
+
+ window
+ UIWindow
+
+
+ window
+
+ window
+ UIWindow
+
+
+
+ IBProjectSource
+ ./Classes/AppDelegate.h
+
+
+
+
+ 0
+ IBCocoaTouchFramework
+
+ com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
+
+
+ YES
+ 3
+ 1181
+
+
diff --git a/components/iosdesigner/Examples/TableView/tabledata.pas b/components/iosdesigner/Examples/TableView/tabledata.pas
new file mode 100644
index 000000000..51de469a4
--- /dev/null
+++ b/components/iosdesigner/Examples/TableView/tabledata.pas
@@ -0,0 +1,44 @@
+unit TableData;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes,
+ SysUtils,
+ db,
+ BufDataset;
+
+function CreateDataset: TBufDataset;
+
+implementation
+
+const
+ BondArray: array[0..2] of string = (
+ 'Dr. No',
+ 'From Russia with Love',
+ 'Goldfinger'
+ );
+
+function CreateDataset: TBufDataset;
+var
+ i: Integer;
+begin
+ result := TBufDataset.Create(nil);
+ result.FieldDefs.Add('ID',ftInteger);
+ result.FieldDefs.Add('Name',ftString,25);
+ result.CreateDataset;
+ result.FilterOptions:=[foCaseInsensitive];
+ result.Open;
+ for i := 0 to high(BondArray) do
+ begin
+ result.Append;
+ result.FieldByName('id').AsInteger:=i+1;
+ result.FieldByName('Name').AsString:=BondArray[i];
+ end;
+ result.Post;
+end;
+
+end.
+